From 60064ce81129f0dd7c541a3ed970a5da0ff08a61 Mon Sep 17 00:00:00 2001 From: Mahiru Date: Sun, 3 Nov 2024 23:15:04 +0800 Subject: [PATCH 1/4] update engine to fix intro problem --- .../assets/{index-4d89e55d.js => index-f831d08d.js} | 4 ++-- .../{initRegister-8ee44f26.js => initRegister-2c254553.js} | 2 +- packages/terre2/assets/templates/WebGAL_Template/index.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename packages/terre2/assets/templates/WebGAL_Template/assets/{index-4d89e55d.js => index-f831d08d.js} (99%) rename packages/terre2/assets/templates/WebGAL_Template/assets/{initRegister-8ee44f26.js => initRegister-2c254553.js} (97%) diff --git a/packages/terre2/assets/templates/WebGAL_Template/assets/index-4d89e55d.js b/packages/terre2/assets/templates/WebGAL_Template/assets/index-f831d08d.js similarity index 99% rename from packages/terre2/assets/templates/WebGAL_Template/assets/index-4d89e55d.js rename to packages/terre2/assets/templates/WebGAL_Template/assets/index-f831d08d.js index a03a801d4..79bf0e929 100644 --- a/packages/terre2/assets/templates/WebGAL_Template/assets/index-4d89e55d.js +++ b/packages/terre2/assets/templates/WebGAL_Template/assets/index-f831d08d.js @@ -81,11 +81,11 @@ Add a component higher in the tree to provide a loading * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var sS=Symbol.for("react.element"),lS=Symbol.for("react.portal"),Lv=Symbol.for("react.fragment"),Dv=Symbol.for("react.strict_mode"),Bv=Symbol.for("react.profiler"),jv=Symbol.for("react.provider"),Uv=Symbol.for("react.context"),Lre=Symbol.for("react.server_context"),$v=Symbol.for("react.forward_ref"),Vv=Symbol.for("react.suspense"),Gv=Symbol.for("react.suspense_list"),Xv=Symbol.for("react.memo"),zv=Symbol.for("react.lazy"),Dre=Symbol.for("react.offscreen"),gF;gF=Symbol.for("react.module.reference");function ai(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case sS:switch(t=t.type,t){case Lv:case Bv:case Dv:case Vv:case Gv:return t;default:switch(t=t&&t.$$typeof,t){case Lre:case Uv:case $v:case zv:case Xv:case jv:return t;default:return e}}case lS:return e}}}gt.ContextConsumer=Uv;gt.ContextProvider=jv;gt.Element=sS;gt.ForwardRef=$v;gt.Fragment=Lv;gt.Lazy=zv;gt.Memo=Xv;gt.Portal=lS;gt.Profiler=Bv;gt.StrictMode=Dv;gt.Suspense=Vv;gt.SuspenseList=Gv;gt.isAsyncMode=function(){return!1};gt.isConcurrentMode=function(){return!1};gt.isContextConsumer=function(t){return ai(t)===Uv};gt.isContextProvider=function(t){return ai(t)===jv};gt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===sS};gt.isForwardRef=function(t){return ai(t)===$v};gt.isFragment=function(t){return ai(t)===Lv};gt.isLazy=function(t){return ai(t)===zv};gt.isMemo=function(t){return ai(t)===Xv};gt.isPortal=function(t){return ai(t)===lS};gt.isProfiler=function(t){return ai(t)===Bv};gt.isStrictMode=function(t){return ai(t)===Dv};gt.isSuspense=function(t){return ai(t)===Vv};gt.isSuspenseList=function(t){return ai(t)===Gv};gt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Lv||t===Bv||t===Dv||t===Vv||t===Gv||t===Dre||typeof t=="object"&&t!==null&&(t.$$typeof===zv||t.$$typeof===Xv||t.$$typeof===jv||t.$$typeof===Uv||t.$$typeof===$v||t.$$typeof===gF||t.getModuleId!==void 0)};gt.typeOf=ai;function Bre(){const t=bre();let e=null,r=null;return{clear(){e=null,r=null},notify(){t(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],i=e;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0,a=r={callback:n,next:null,prev:r};return a.prev?a.prev.next=a:e=a,function(){!i||e===null||(i=!1,a.next?a.next.prev=a.prev:r=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}const _P={notify(){},get:()=>[]};function jre(t,e){let r,n=_P,i=0,a=!1;function o(v){c();const g=n.subscribe(v);let m=!1;return()=>{m||(m=!0,g(),f())}}function s(){n.notify()}function u(){p.onStateChange&&p.onStateChange()}function l(){return a}function c(){i++,r||(r=e?e.addNestedSub(u):t.subscribe(u),n=Bre())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=_P)}function h(){a||(a=!0,c())}function d(){a&&(a=!1,f())}const p={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:d,getListeners:()=>n};return p}const Ure=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$re=Ure?ne.useLayoutEffect:ne.useEffect;function yF({store:t,context:e,children:r,serverState:n,stabilityCheck:i="once",noopCheck:a="once"}){const o=ne.useMemo(()=>{const l=jre(t);return{store:t,subscription:l,getServerState:n?()=>n:void 0,stabilityCheck:i,noopCheck:a}},[t,n,i,a]),s=ne.useMemo(()=>t.getState(),[t]);$re(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==t.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,s]);const u=e||Eo;return ne.createElement(u.Provider,{value:o},r)}function _F(t=Eo){const e=t===Eo?fF:nS(t);return function(){const{store:n}=e();return n}}const Vre=_F();function Gre(t=Eo){const e=t===Eo?Vre:_F(t);return function(){return e().dispatch}}const Lr=Gre();Ere(yre.useSyncExternalStoreWithSelector);xre(XI.unstable_batchedUpdates);const _n=()=>{const t=Lr();return{playSeEnter:()=>{t(Ge({key:"uiSe",value:iF}))},playSeClick:()=>{t(Ge({key:"uiSe",value:aF}))},playSePageChange:()=>{t(Ge({key:"uiSe",value:Zte}))},playSeDialogOpen:()=>{t(Ge({key:"uiSe",value:Jte}))},playSeSwitch:()=>{t(Ge({key:"uiSe",value:Qte}))}}},uS=()=>({playSeEnter:()=>{te.dispatch(Ge({key:"uiSe",value:iF}))},playSeClick:()=>{te.dispatch(Ge({key:"uiSe",value:aF}))}}),Xre=[{reg:/\\\\/g,val:"\\"},{reg:/\\\|/g,val:"|"},{reg:/\\:/g,val:":"},{reg:/\\,/g,val:","},{reg:/\\;/g,val:";"},{reg:/\\./g,val:"."}],cS=t=>{let e=t;for(let r of Xre)e=e.replaceAll(r.reg,r.val);return e};function zre(t){return Kv.parseScssToWebgalStyleObj(t)}function wi(t){const[e,r]=ne.useState(t);return{_value:e,set:function(n){this._value=n,r(n)},get value(){return this._value},set value(n){this.set(n)}}}function Wre(t){if(t.sheet)return t.sheet;for(var e=0;e0?Gr(hu,--Pn):0,jl--,sr===10&&(jl=1,Yv--),sr}function Bn(){return sr=Pn2||Kc(sr)>3?"":" "}function ane(t,e){for(;--e&&Bn()&&!(sr<48||sr>102||sr>57&&sr<65||sr>70&&sr<97););return Xf(t,pd()+(e<6&&Ji()==32&&Bn()==32))}function l_(t){for(;Bn();)switch(sr){case t:return Pn;case 34:case 39:t!==34&&t!==39&&l_(sr);break;case 40:t===41&&l_(t);break;case 92:Bn();break}return Pn}function one(t,e){for(;Bn()&&t+sr!==47+10;)if(t+sr===42+42&&Ji()===47)break;return"/*"+Xf(e,Pn-1)+"*"+Wv(t===47?t:Bn())}function sne(t){for(;!Kc(Ji());)Bn();return Xf(t,Pn)}function lne(t){return TF(md("",null,null,null,[""],t=EF(t),0,[0],t))}function md(t,e,r,n,i,a,o,s,u){for(var l=0,c=0,f=o,h=0,d=0,p=0,v=1,g=1,m=1,y=0,_="",x=i,b=a,S=n,w=_;g;)switch(p=y,y=Bn()){case 40:if(p!=108&&Gr(w,f-1)==58){s_(w+=ot(vd(y),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:w+=vd(y);break;case 9:case 10:case 13:case 32:w+=ine(p);break;case 92:w+=ane(pd()-1,7);continue;case 47:switch(Ji()){case 42:case 47:yh(une(one(Bn(),pd()),e,r),u);break;default:w+="/"}break;case 123*v:s[l++]=Ui(w)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:m==-1&&(w=ot(w,/\f/g,"")),d>0&&Ui(w)-f&&yh(d>32?bP(w+";",n,r,f-1):bP(ot(w," ","")+";",n,r,f-2),u);break;case 59:w+=";";default:if(yh(S=xP(w,e,r,l,c,i,s,_,x=[],b=[],f),a),y===123)if(c===0)md(w,e,S,S,x,a,f,s,b);else switch(h===99&&Gr(w,3)===110?100:h){case 100:case 108:case 109:case 115:md(t,S,S,n&&yh(xP(t,S,S,0,0,i,s,_,i,x=[],f),b),i,b,f,s,n?x:b);break;default:md(w,S,S,S,[""],b,0,s,b)}}l=c=d=0,v=m=1,_=w="",f=o;break;case 58:f=1+Ui(w),d=p;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&nne()==125)continue}switch(w+=Wv(y),y*v){case 38:m=c>0?1:(w+="\f",-1);break;case 44:s[l++]=(Ui(w)-1)*m,m=1;break;case 64:Ji()===45&&(w+=vd(Bn())),h=Ji(),c=f=Ui(_=w+=sne(pd())),y++;break;case 45:p===45&&Ui(w)==2&&(v=0)}}return a}function xP(t,e,r,n,i,a,o,s,u,l,c){for(var f=i-1,h=i===0?a:[""],d=dS(h),p=0,v=0,g=0;p0?h[m]+" "+y:ot(y,/&\f/g,h[m])))&&(u[g++]=_);return Hv(t,e,r,i===0?fS:s,u,l,c)}function une(t,e,r){return Hv(t,e,r,xF,Wv(rne()),qc(t,2,-2),0)}function bP(t,e,r,n){return Hv(t,e,r,hS,qc(t,0,n),qc(t,n+1,-1),n)}function El(t,e){for(var r="",n=dS(t),i=0;i6)switch(Gr(t,e+1)){case 109:if(Gr(t,e+4)!==45)break;case 102:return ot(t,/(.+:)(.+)-([^]+)/,"$1"+at+"$2-$3$1"+up+(Gr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~s_(t,"stretch")?AF(ot(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Gr(t,e+1)!==115)break;case 6444:switch(Gr(t,Ui(t)-3-(~s_(t,"!important")&&10))){case 107:return ot(t,":",":"+at)+t;case 101:return ot(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+at+(Gr(t,14)===45?"inline-":"")+"box$3$1"+at+"$2$3$1"+Yr+"$2box$3")+t}break;case 5936:switch(Gr(t,e+11)){case 114:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return at+t+Yr+t+t}return t}var _ne=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case hS:e.return=AF(e.value,e.length);break;case bF:return El([Uu(e,{value:ot(e.value,"@","@"+at)})],i);case fS:if(e.length)return tne(e.props,function(a){switch(ene(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return El([Uu(e,{props:[ot(a,/:(read-\w+)/,":"+up+"$1")]})],i);case"::placeholder":return El([Uu(e,{props:[ot(a,/:(plac\w+)/,":"+at+"input-$1")]}),Uu(e,{props:[ot(a,/:(plac\w+)/,":"+up+"$1")]}),Uu(e,{props:[ot(a,/:(plac\w+)/,Yr+"input-$1")]})],i)}return""})}},xne=[_ne],bne=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var g=v.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=e.stylisPlugins||xne,a={},o,s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var g=v.getAttribute("data-emotion").split(" "),m=1;m=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var wne={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ene=/[A-Z]|^ms/g,Tne=/_EMO_([^_]+?)_([^]*?)_EMO_/g,CF=function(e){return e.charCodeAt(1)===45},wP=function(e){return e!=null&&typeof e!="boolean"},Yg=dne(function(t){return CF(t)?t:t.replace(Ene,"-$&").toLowerCase()}),EP=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Tne,function(n,i,a){return $i={name:i,styles:a,next:$i},i})}return wne[e]!==1&&!CF(e)&&typeof r=="number"&&r!==0?r+"px":r};function Zc(t,e,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return $i={name:r.name,styles:r.styles,next:$i},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)$i={name:n.name,styles:n.styles,next:$i},n=n.next;var i=r.styles+";";return i}return Ane(t,e,r)}case"function":{if(t!==void 0){var a=$i,o=r(t);return $i=a,Zc(t,e,o)}break}}if(e==null)return r;var s=e[r];return s!==void 0?s:r}function Ane(t,e,r){var n="";if(Array.isArray(r))for(var i=0;ia.stage.replacedUIlable),n=(a,o)=>{var u;const s=(r==null?void 0:r[a])??a;if(Object.keys(e.value.classNameStyles).includes(s)){const l=ac(((u=e.value.classNameStyles)==null?void 0:u[s])??"");return`${o} ${l}`}return o},i=async()=>{ge.debug("更新 Scss 文件",t);const o=(await Wc.get(`game/template/${t}`)).data;e.set(zre(o))};return ne.useEffect(()=>{i()},[]),ne.useEffect(()=>{kne(e.value.others)},[e.value.others]),Mne(i),n}function Mne(t){const e=()=>{t()};ne.useEffect(()=>(L.events.styleUpdate.on(e),()=>L.events.styleUpdate.off(e)),[])}class vS{constructor(e,r){Ae(this,"text");Ae(this,"jump");Ae(this,"jumpToScene");Ae(this,"showCondition");Ae(this,"enableCondition");this.text=cS(e),this.jump=r,this.jumpToScene=r.match(new RegExp("(?"),n=r.length>1?r[0]:null,a=(r.length>1?r[1]:r[0]).split(new RegExp("(?{const r=t.content.split(new RegExp("(?vS.parse(n));return ea.render(C.jsx(yF,{store:te,children:C.jsx(Nne,{chooseOptions:r})}),document.getElementById("chooseContainer")),{performName:"choose",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{ea.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}};function Nne(t){const r=te.getState().userData.optionData.textboxFont===Zi.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:n,playSeClick:i}=uS(),a=pS("Stage/Choose/choose.scss"),o=s=>s.filter((u,l)=>d_(u.showCondition)).map((u,l)=>{const c=d_(u.enableCondition),f=c?a("Choose_item",gh.Choose_item):a("Choose_item_disabled",gh.Choose_item_disabled),h=c?()=>{i(),u.jumpToScene?rF(u.jump,u.text):nF(u.jump),L.gameplay.performController.unmountPerform("choose")}:()=>{};return C.jsx("div",{className:a("Choose_item_outer",gh.Choose_item_outer),children:C.jsx("div",{className:f,style:{fontFamily:r},onClick:h,onMouseEnter:n,children:u.text})},u.jump+l)});return C.jsx("div",{className:a("Choose_Main",gh.Choose_Main),children:o(t.chooseOptions)})}const Lne=t=>(ge.debug(`脚本内注释${t.content}`),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Dne=t=>(t.content!==""&&t.content!=="none"?te.dispatch(Ge({key:"enableFilm",value:t.content})):te.dispatch(Ge({key:"enableFilm",value:""})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Bne="_Choose_Main_4xkm5_1",jne="_Choose_item_4xkm5_13",Une="_glabalDialog_container_inner_4xkm5_28",$ne="_glabalDialog_container_4xkm5_28",Vne="_title_4xkm5_47",Gne="_button_4xkm5_59",Vs={Choose_Main:Bne,Choose_item:jne,glabalDialog_container_inner:Une,glabalDialog_container:$ne,title:Vne,button:Gne},Xne=t=>{const e=t.content.toString().trim(),r=He(t,"title"),n=(r===0?"Please Input":r)??"Please Input",i=He(t,"buttonText"),a=(i===0?"OK":i)??"OK",s=te.getState().userData.optionData.textboxFont===Zi.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:u,playSeClick:l}=uS(),c=C.jsx("div",{style:{fontFamily:s},className:Vs.glabalDialog_container,children:C.jsxs("div",{className:Vs.glabalDialog_container_inner,children:[C.jsx("div",{className:Vs.title,children:n}),C.jsx("input",{id:"user-input",className:Vs.Choose_item}),C.jsx("div",{onMouseEnter:u,onClick:()=>{const f=document.getElementById("user-input");f&&te.dispatch(Pk({key:e,value:((f==null?void 0:f.value)??"")===""?" ":(f==null?void 0:f.value)??""})),l(),L.gameplay.performController.unmountPerform("userInput"),tn()},className:Vs.button,children:a})]})});return ea.render(C.jsx("div",{className:Vs.Choose_Main,children:c}),document.getElementById("chooseContainer")),{performName:"userInput",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{ea.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}},zne="_FullScreenPerform_main_7er8a_2",Wne="_FullScreenPerform_element_7er8a_9",Yne="_fullScreen_video_7er8a_17",Hne="_fadeIn_7er8a_74",qne="_intro_showSoftly_7er8a_1",Kne="_slideIn_7er8a_80",Zne="_typingEffect_7er8a_86",Qne="_typing_7er8a_86",Jne="_blinkCursor_7er8a_1",eie="_pixelateEffect_7er8a_95",tie="_pixelateAnimation_7er8a_1",rie="_revealAnimation_7er8a_101",nie="_videoContainer_7er8a_115",Bi={FullScreenPerform_main:zne,FullScreenPerform_element:Wne,fullScreen_video:Yne,fadeIn:Hne,intro_showSoftly:qne,slideIn:Kne,typingEffect:Zne,typing:Qne,blinkCursor:Jne,pixelateEffect:eie,pixelateAnimation:tie,revealAnimation:rie,videoContainer:nie},iie=t=>{const e=`introPerform${Math.random().toString()}`;let r,n="rgba(0, 0, 0, 1)",i="rgba(255, 255, 255, 1)";const a=(b,S=0)=>{switch(b){case"fadeIn":return Bi.fadeIn;case"slideIn":return Bi.slideIn;case"typingEffect":return`${Bi.typingEffect} ${S}`;case"pixelateEffect":return Bi.pixelateEffect;case"revealAnimation":return Bi.revealAnimation;default:return Bi.fadeIn}};let o=Bi.fadeIn,s=1500,u=!1;for(const b of t.args){if(b.key==="backgroundColor"&&(n=b.value||"rgba(0, 0, 0, 1)"),b.key==="fontColor"&&(i=b.value||"rgba(255, 255, 255, 1)"),b.key==="fontSize")switch(b.value){case"small":r="280%";break;case"medium":r="350%";break;case"large":r="420%";break}if(b.key==="animation"&&(o=a(b.value)),b.key==="delayTime"){const S=parseInt(b.value.toString(),10);s=isNaN(S)?s:S}b.key==="hold"&&b.value===!0&&(u=!0)}const l={background:n,color:i,fontSize:r||"350%",width:"100%",height:"100%"},c=t.content.split(new RegExp("(?cS(b));let h=1e3+s*c.length;const d=u?1e3*60*60*24:1e3+s*c.length;let p=!0,v=setTimeout(()=>{p=!1},h),g=setTimeout(()=>{});const m=()=>{const b=document.getElementById("introContainer");if(h-=s,clearTimeout(v),v=setTimeout(()=>{p=!1},h),b){const S=b.childNodes[0].childNodes[0].childNodes,w=S.length;S.forEach((E,T)=>{const A=Number(E.style.animationDelay.split("ms")[0]);A>0&&(E.style.animationDelay=`${A-s}ms`),T===w-1&&(A===0?(clearTimeout(g),L.gameplay.performController.unmountPerform(e)):(clearTimeout(g),u||(g=setTimeout(()=>{L.gameplay.performController.unmountPerform(e)},h))))})}};L.events.userInteractNext.on(m);const y=c.map((b,S)=>C.jsxs("div",{style:{animationDelay:`${s*S}ms`},className:o,children:[b,b===""?" ":""]},"introtext"+S+Math.random().toString())),_=C.jsx("div",{style:l,children:C.jsx("div",{style:{padding:"3em 4em 3em 4em"},children:y})});ea.render(_,document.getElementById("introContainer"));const x=document.getElementById("introContainer");return x&&(x.style.display="block"),{performName:e,duration:d,isHoldOn:!1,stopFunction:()=>{const b=document.getElementById("introContainer");b&&(b.style.display="none"),L.events.userInteractNext.off(m)},blockingNext:()=>p,blockingAuto:()=>p,stopTimeout:void 0,goNextWhenOver:!0}},aie=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),oie=t=>{let e=t.content;return(t.content==="none"||t.content==="")&&(e=""),te.dispatch(Ge({key:"miniAvatar",value:e})),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},sie="modulepreload",lie=function(t,e){return new URL(t,e).href},PP={},uie=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=lie(a,n),a in PP)return;PP[a]=!0;const o=a.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(!!n)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===a&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":sie,o||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},RF=new Map;function cie(t){return t?typeof t=="string"?t:t():null}function IF(t){const e=cie(t);return e||(ge.error("Get name of perform failed. There no name of the perform."),"")}function _we(t,e){if(!e||typeof e!="function")throw new Error(`"${t}" is not a callback.`);RF.set(IF(t),e)}function fie(t,e=[]){const r=RF.get(IF(t));if(!r||!(r instanceof Function))throw ge.error(`Can't call the perform named "${t}"`),new Error(`"${t}" don't have the pixiPerform callback.`);return r(...e)}uie(()=>import("./initRegister-8ee44f26.js"),[],import.meta.url);const hie=t=>{const e="PixiPerform"+t.content;L.gameplay.performController.performList.forEach(a=>{if(a.performName===e)return{performName:"none",duration:0,isOver:!1,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}});const r=fie(t.content),{container:n,tickerKey:i}=r;return{performName:e,duration:0,isHoldOn:!0,stopFunction:()=>{var a,o;ge.warn("现在正在卸载pixi演出"),n.destroy({texture:!0,baseTexture:!0}),(a=L.gameplay.pixiStage)==null||a.effectsContainer.removeChild(n),(o=L.gameplay.pixiStage)==null||o.removeAnimation(i)},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},die=t=>{var a;ge.debug("play SE");let e="effect-sound";L.gameplay.performController.unmountPerform(e,!0);let r=t.content,n=!1;He(t,"id")&&(e=`effect-sound-${((a=He(t,"id"))==null?void 0:a.toString())??""}`,L.gameplay.performController.unmountPerform(e,!0),n=!0);let i=!1;return{performName:"none",blockingAuto(){return!1},blockingNext(){return!1},isHoldOn:!1,stopFunction(){},stopTimeout:void 0,duration:1e3*60*60,arrangePerformPromise:new Promise(o=>{setTimeout(()=>{var p;const s=He(t,"volume");let u=document.createElement("audio");u.src=r,n&&(u.loop=!0);const l=te.getState().userData,c=l.optionData.volumeMain,f=typeof s=="number"&&s>=0&&s<=100?s:100,h=c*.01*(((p=l.optionData)==null?void 0:p.seVolume)??100)*.01*f*.01;u.volume=h,u.currentTime=0;const d={performName:e,duration:1e3*60*60,isHoldOn:n,skipNextCollect:!0,stopFunction:()=>{u.pause()},blockingNext:()=>!1,blockingAuto:()=>n?!1:!i,stopTimeout:void 0};o(d),u==null||u.play(),u.onended=()=>{for(const v of L.gameplay.performController.performList)v.performName===e&&(i=!0,v.stopFunction(),L.gameplay.performController.unmountPerform(v.performName))}},1)})}},pie=t=>{const e=te.getState().userData,r=e.optionData.volumeMain,n=r*.01*e.optionData.vocalVolume*.01,i=r*.01*e.optionData.bgmVolume*.01,a=TS();let o=He(t,"skipOff"),s=!1;o&&(s=!0),ea.render(C.jsx("div",{className:Bi.videoContainer,children:C.jsx("video",{className:Bi.fullScreen_video,id:"playVideoElement",src:t.content,autoPlay:!0})}),document.getElementById("videoContainer"));let u=!1;return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>s,blockingAuto:()=>!0,stopTimeout:void 0,arrangePerformPromise:new Promise(l=>{setTimeout(()=>{let c=document.getElementById("playVideoElement");if(c!==null){c.currentTime=0,c.volume=i;const f=()=>{for(const y of L.gameplay.performController.performList)y.performName===a&&(u=!0,y.stopFunction(),L.gameplay.performController.unmountPerform(y.performName))},h=()=>{f()};L.events.fullscreenDbClick.on(h);const d={performName:a,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{L.events.fullscreenDbClick.off(h);const y=document.getElementById("currentBgm");y&&(y.volume=i.toString());const _=document.getElementById("currentVocal");y&&(_.volume=n.toString()),ea.render(C.jsx("div",{}),document.getElementById("videoContainer"))},blockingNext:()=>s,blockingAuto:()=>!u,stopTimeout:void 0,goNextWhenOver:!0};l(d);const p=0,v=0,g=document.getElementById("currentBgm");g&&(g.volume=v.toString());const m=document.getElementById("currentVocal");g&&(m.volume=p.toString()),c==null||c.play(),c.onended=()=>{f()}}},1)})}},vie=t=>{var o;te.getState().stage.currentDialogKey;const e=t.content,r=En(e),n=(((o=He(t,"target"))==null?void 0:o.toString())??"default_id").toString(),i=`${n}-${e}-${r}`;let a;return setTimeout(()=>{var u,l;(u=L.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n);const s=lp(e,n,r);s&&(ge.debug(`动画${e}作用在${n}`,r),(l=L.gameplay.pixiStage)==null||l.registerAnimation(s,i,n))},0),a=()=>{setTimeout(()=>{var s;te.getState().stage.currentDialogKey,(s=L.gameplay.pixiStage)==null||s.removeAnimationWithSetEffects(i)},0)},{performName:i,duration:r,isHoldOn:!1,stopFunction:a,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function mie(t,e){const r=L.gameplay.pixiStage.getStageObjByKey(t);function n(){r&&(r.pixiContainer.alpha=0,r.pixiContainer.blur=0)}function i(){r&&(r.pixiContainer.alpha=1,r.pixiContainer.blur=5)}function a(o){if(r){const s=r.pixiContainer,u=L.gameplay.pixiStage.frameDuration,l=e/u*o,c=1/l,f=5/l;s.alpha<1&&(s.alpha+=c),s.blur<5&&(s.blur+=f)}}return{setStartState:n,setEndState:i,tickerFunc:a}}const gie=[{name:"universalSoftIn",animationGenerateFunc:SM},{name:"universalSoftOff",animationGenerateFunc:wM},{name:"testblur",animationGenerateFunc:mie}],yie=t=>{var s,u,l;te.getState().stage.currentDialogKey;const e=t.content,r=He(t,"duration")??0,n=((s=He(t,"target"))==null?void 0:s.toString())??"0",i=`${n}-${e}-${r}`,a=_ie(e);let o=()=>{};if(a){ge.debug(`动画${e}作用在${n}`,r);const c=a(n,r);(u=L.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n),(l=L.gameplay.pixiStage)==null||l.registerAnimation(c,i,n),o=()=>{var f;te.getState().stage.currentDialogKey,(f=L.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(i)}}return{performName:i,duration:r,isHoldOn:!1,stopFunction:o,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function _ie(t){const e=gie.find(r=>r.name===t);return ge.debug("装载动画",e),e?e.animationGenerateFunc:null}const xie=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),bie=t=>{var l;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;try{n=JSON.parse(r)}catch{n=[]}const i={name:e,effects:n};L.animationManager.addAnimation(i);const a=En(e),o=((l=He(t,"target"))==null?void 0:l.toString())??"0",s=`${o}-${e}-${a}`;let u=()=>{};return setTimeout(()=>{var f,h;(f=L.gameplay.pixiStage)==null||f.stopPresetAnimationOnTarget(o);const c=lp(e,o,a);c&&(ge.debug(`动画${e}作用在${o}`,a),(h=L.gameplay.pixiStage)==null||h.registerAnimation(c,s,o))},0),u=()=>{setTimeout(()=>{var c;te.getState().stage.currentDialogKey,(c=L.gameplay.pixiStage)==null||c.removeAnimationWithSetEffects(s)},0)},{performName:s,duration:a,isHoldOn:!1,stopFunction:u,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Sie(t){return t.content==="hide"?te.dispatch(Ge({key:"isDisableTextbox",value:!0})):te.dispatch(Ge({key:"isDisableTextbox",value:!1})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}}const wie=t=>{var c;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;const i=He(t,"duration"),a=((c=He(t,"target"))==null?void 0:c.toString())??"0";try{const f=JSON.parse(r);n=Yc(a,f,i)}catch{n=[]}const o={name:e,effects:n};L.animationManager.addAnimation(o);const s=Tie(e),u=`${a}-${e}-${s}`;let l=()=>{};return setTimeout(()=>{var h,d;(h=L.gameplay.pixiStage)==null||h.stopPresetAnimationOnTarget(a);const f=Eie(e,a,s);f&&(ge.debug(`动画${e}作用在${a}`,s),(d=L.gameplay.pixiStage)==null||d.registerAnimation(f,u,a))},0),l=()=>{setTimeout(()=>{var f;te.getState().stage.currentDialogKey,(f=L.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(u)},0)},{performName:u,duration:s,isHoldOn:!1,stopFunction:l,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Eie(t,e,r){const n=L.animationManager.getAnimations().find(i=>i.name===t);if(n){const i=n.effects.map(a=>{const o=Jt({...Kb,duration:0});return Object.assign(o,a),o.duration=a.duration,o});return ge.debug("装载自定义动画",i),tF(i,e,r)}return null}function Tie(t){const e=L.animationManager.getAnimations().find(r=>r.name===t);if(e){let r=0;return e.effects.forEach(n=>{r+=n.duration}),r}return 0}const Aie=t=>{let e="0";for(const r of t.args)r.key==="target"&&(e=r.value.toString());return He(t,"enter")&&L.animationManager.nextEnterAnimationName.set(e,He(t,"enter").toString()),He(t,"exit")&&L.animationManager.nextExitAnimationName.set(e+"-off",He(t,"exit").toString()),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},Cie=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),ge.info(`解锁BGM:${r},路径:${e},所属系列:${n}`),te.dispatch(Wk({name:r,url:e,series:n}));const i=te.getState().userData;return Os.setItem(L.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},Pie=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),ge.info(`解锁CG:${r},路径:${e},所属系列:${n}`),te.dispatch(zk({name:r,url:e,series:n}));const i=te.getState().userData;return Os.setItem(L.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},mS=(t,e=!0)=>{t&&L.backlogManager.makeBacklogEmpty(),e&&L.sceneManager.resetScene(),L.gameplay.performController.removeAllPerform(),L.gameplay.resetGamePlay();const r=Jt(Ck),n=te.getState().stage.GameVar;te.dispatch(ov(r)),e||te.dispatch(Ge({key:"GameVar",value:n}))},Oie={saveData:[],quickSaveData:null},kF=Qp({name:"saveData",initialState:Jt(Oie),reducers:{setFastSave:(t,e)=>{t.quickSaveData=e.payload},resetFastSave:t=>{t.quickSaveData=null},resetSaves:t=>{t.quickSaveData=null,t.saveData=[]},saveGame:(t,e)=>{t.saveData[e.payload.index]=e.payload.saveData},replaceSaveGame:(t,e)=>{t.saveData=e.payload}}}),Oa=kF.actions,Rie=kF.reducer,Iie=t=>{mS(!0);const e=te.dispatch,r=Nn("start.txt",Fn.scene);return setTimeout(()=>{L.sceneManager.resetScene()},5),e(Oa.resetFastSave()),hp(),ua(r).then(n=>{L.sceneManager.sceneData.currentScene=ca(n,"start.txt",r)}),e(rt({component:"showTitle",visibility:!0})),AS(te.getState().GUI.titleBgm),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},kie=t=>(nF(t.content),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Mie=t=>(L.gameplay.performController.performList.forEach(e=>{if(e.performName.match(/PixiPerform/)){ge.warn("pixi 被脚本重新初始化",e.performName);for(let r=0;r{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),ut={audioContext:new AudioContext,source:null,analyser:void 0,dataArray:void 0,audioLevelInterval:setInterval(()=>{},0),blinkTimerID:setTimeout(()=>{},0),maxAudioLevel:0},Fie=t=>(ut.maxAudioLevel=Math.max(t,ut.maxAudioLevel),{OPEN_THRESHOLD:ut.maxAudioLevel*.75,HALF_OPEN_THRESHOLD:ut.maxAudioLevel*.5}),Nie=t=>{let e=!1;function r(){var n;e||t.animationEndTime&&Date.now()>t.animationEndTime||(e=!0,(n=L.gameplay.pixiStage)==null||n.performBlinkAnimation(t.key,t.animationItem,"closed",t.pos),ut.blinkTimerID=setTimeout(()=>{var a;(a=L.gameplay.pixiStage)==null||a.performBlinkAnimation(t.key,t.animationItem,"open",t.pos),e=!1;const i=Math.random()*300+3500;ut.blinkTimerID=setTimeout(r,i)},200))}r()},Lie=(t,e,r)=>{t.getByteFrequencyData(e);let n=0;for(let i=0;i{var h,d;const{audioLevel:e,OPEN_THRESHOLD:r,HALF_OPEN_THRESHOLD:n,currentMouthValue:i,lerpSpeed:a,key:o,animationItem:s,pos:u}=t;let l;e>r?l=1:e>n?l=.5:l=0;const c=i+(l-i)*a;(h=L.gameplay.pixiStage)==null||h.setModelMouthY(o,e);let f;c>.75?f="open":c>.25?f="half_open":f="closed",s!==void 0&&((d=L.gameplay.pixiStage)==null||d.performMouthSyncAnimation(o,s,f,u))};class Die{constructor(e){Ae(this,"subject");Ae(this,"result");Ae(this,"isEnd",!1);this.subject=e}with(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this}endsWith(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this.evaluate()}default(e){return this.isEnd||(this.result=e()),this.evaluate()}evaluate(){return this.result}}function zf(t){return new Die(t)}const Bie=t=>{ge.debug("play vocal");const e="vocal-play",r=He(t,"vocal"),n=He(t,"volume");let i;i=te.getState().stage;let a="",o="";const s=i.freeFigure,u=i.figureAssociatedAnimation;let l=0,c=0;const f=1;let h=document.getElementById("currentVocal");L.gameplay.performController.unmountPerform("vocal-play",!0),h!==null&&(h.currentTime=0,h.pause());for(const p of t.args)p.value===!0&&zf(p.key).with("left",()=>{a="left"}).with("right",()=>{a="right"}).endsWith("center",()=>{a="center"}),p.key==="figureId"&&(o=`${p.value.toString()}`);te.dispatch(Ge({key:"playVocal",value:r})),te.dispatch(Ge({key:"vocal",value:r}));let d=!1;return{arrangePerformPromise:new Promise(p=>{setTimeout(()=>{let v=document.getElementById("currentVocal");if(typeof n=="number"&&n>=0&&n<=100?te.dispatch(Ge({key:"vocalVolume",value:n})):te.dispatch(Ge({key:"vocalVolume",value:100})),v!==null){v.currentTime=0;const g={performName:e,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{clearInterval(ut.audioLevelInterval),v.pause(),o=o||`fig-${a}`;const y=u.find(_=>_.targetId===o);u_({audioLevel:0,OPEN_THRESHOLD:1,HALF_OPEN_THRESHOLD:1,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:y,pos:a}),clearTimeout(ut.blinkTimerID)},blockingNext:()=>!1,blockingAuto:()=>!d,skipNextCollect:!0,stopTimeout:void 0};L.gameplay.performController.arrangeNewPerform(g,t,!1),o=o||`fig-${a}`;const m=u.find(y=>y.targetId===o);if(m){const y=s.find(b=>b.key===o);if(y&&(a=y.basePosition),!ut.audioContext){let b;b=new AudioContext,ut.analyser=b.createAnalyser(),ut.analyser.fftSize=256,ut.dataArray=new Uint8Array(ut.analyser.frequencyBinCount)}ut.analyser||(ut.analyser=ut.audioContext.createAnalyser(),ut.analyser.fftSize=256),l=ut.analyser.frequencyBinCount,ut.dataArray=new Uint8Array(l);let _=document.getElementById("currentVocal");ut.source||(ut.source=ut.audioContext.createMediaElementSource(_),ut.source.connect(ut.analyser)),ut.analyser.connect(ut.audioContext.destination),ut.audioLevelInterval=setInterval(()=>{const b=Lie(ut.analyser,ut.dataArray,l),{OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w}=Fie(b);u_({audioLevel:b,OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:m,pos:a})},50);let x;x=Date.now()+1e4,Nie({key:o,animationItem:m,pos:a,animationEndTime:x}),setTimeout(()=>{clearTimeout(ut.blinkTimerID)},1e4)}v==null||v.play(),v.onended=()=>{for(const y of L.gameplay.performController.performList)y.performName===e&&(d=!0,y.stopFunction(),L.gameplay.performController.unmountPerform(y.performName))}}},1)})}};function gS(t){switch(t){case hn.slow:return 80;case hn.normal:return 35;case hn.fast:return 3}}function MF(t){switch(t){case hn.slow:return 800;case hn.normal:return 350;case hn.fast:return 200}}function FF(){const t=Ne(r=>r.userData.optionData.textboxFont);function e(){return zf(t).with(Zi.song,()=>'"思源宋体", serif').with(Zi.lxgw,()=>'"LXGW", serif').with(Zi.hei,()=>'"WebgalUI", serif').default(()=>'"WebgalUI", serif')}return e()}function c_(t){switch(t){case 0:return 155;case 1:return 205;case 2:return 230;default:return 205}}const jie="_TextBox_EventHandler_1jt23_2",Uie="_TextBox_Container_1jt23_10",$ie="_showSoftly_1jt23_1",Vie="_TextBox_main_1jt23_18",Gie="_TextBox_main_miniavatarOff_1jt23_39",Xie="_TextBox_Background_1jt23_43",zie="_TextBox_textElement_start_1jt23_56",Wie="_TextDelayShow_1jt23_1",Yie="_outer_1jt23_64",Hie="_inner_1jt23_78",qie="_zhanwei_1jt23_89",Kie="_TextBox_textElement_Settled_1jt23_97",Zie="_TextBox_showName_1jt23_104",Qie="_TextBox_ShowName_Background_1jt23_117",Jie="_miniAvatarContainer_1jt23_132",eae="_miniAvatarImg_1jt23_142",tae="_nameContainer_1jt23_150",rae="_outerName_1jt23_156",nae="_innerName_1jt23_167",iae="_text_1jt23_174",yt={TextBox_EventHandler:jie,TextBox_Container:Uie,showSoftly:$ie,TextBox_main:Vie,TextBox_main_miniavatarOff:Gie,TextBox_Background:Xie,TextBox_textElement_start:zie,TextDelayShow:Wie,outer:Yie,inner:Hie,zhanwei:qie,TextBox_textElement_Settled:Kie,TextBox_showName:Zie,TextBox_ShowName_Background:Qie,miniAvatarContainer:Jie,miniAvatarImg:eae,nameContainer:tae,outerName:rae,innerName:nae,text:iae};function NF(t){const{textArray:e,textDelay:r,currentConcatDialogPrev:n,currentDialogKey:i,isText:a,isSafari:o,isFirefox:s,fontSize:u,miniAvatar:l,isHasName:c,showName:f,font:h,textDuration:d,isUseStroke:p,textboxOpacity:v,textSizeState:g}=t,m=pS("Stage/TextBox/textbox.scss");ne.useEffect(()=>{function b(){[...document.querySelectorAll(".Textelement_start")].forEach(E=>{E.className=m("TextBox_textElement_Settled",yt.TextBox_textElement_Settled)})}return L.events.textSettle.on(b),()=>{L.events.textSettle.off(b)}},[]);let y=0;const _=f.map((b,S)=>{const w=b.map((E,T)=>{const A=E.reactNode;let O="",P="",k=!1;if(E.enhancedValue){k=!0;const j=E.enhancedValue;for(const z of j){const{key:J,value:Z}=z;switch(J){case"style":O=Z;break;case"tips":break;case"style-alltext":P=Z;break}}}const M=" "+ac(O,{label:"showname"}),B=" "+ac(P,{label:"showname"});return k?C.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:yt.zhanwei+B,children:[A,C.jsx("span",{className:m("outerName",yt.outerName)+M+B,children:A}),p&&C.jsx("span",{className:m("innerName",yt.innerName)+B,children:A})]})},T):C.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:yt.zhanwei+B,children:[A,C.jsx("span",{className:m("outerName",yt.outerName)+M+B,children:A}),p&&C.jsx("span",{className:m("innerName",yt.innerName)+B,children:A})]})},T)});return C.jsx("div",{style:{wordBreak:o||t.isFirefox?"break-all":void 0,display:o?"flex":void 0,flexWrap:o?"wrap":void 0},children:w},`text-line-${S}`)}),x=e.map((b,S)=>{const w=b.map((E,T)=>{const A=E.reactNode;let O="",P="";if(E.enhancedValue){const z=E.enhancedValue;for(const J of z){const{key:Z,value:$}=J;switch(Z){case"style":O=$;break;case"tips":break;case"style-alltext":P=$;break}}}let k=y*r;y++;let M=n.length;n!==""&&y>=M&&(k=k-M*r);const B=" "+ac(O),j=" "+ac(P);return y{const[t,e]=ne.useState(!0);ne.useEffect(()=>{const _=()=>{const x=cp.height,b=cp.width,S=window.innerHeight,w=window.innerWidth,E=S/x,T=w/b,A=w/x,O=S/b;[E,T,A,O].forEach(P=>{P<=.2?e(!1):e(!0)})};return window.addEventListener("resize",_),_(),()=>{window.removeEventListener("resize",_)}},[]);const r=Ne(_=>_.stage),n=Ne(_=>_.userData),i=gS(n.optionData.textSpeed),a=MF(n.optionData.textSpeed);let o=c_(n.optionData.textSize)+"%";const s=FF(),u=r.showText!==""||r.showName!=="";let l=n.optionData.textSize;u&&r.showTextSize!==-1&&(o=c_(r.showTextSize)+"%",l=r.showTextSize);const c=zf(l).with(ti.small,()=>3).with(ti.medium,()=>2).with(ti.large,()=>2).default(()=>2),f=gs(r.showText,c),h=r.showName!=="",d=gs(r.showName,c),p=r.currentConcatDialogPrev,v=r.currentDialogKey,g=r.miniAvatar,m=n.optionData.textboxOpacity,y=NF;return C.jsx(y,{textArray:f,isText:u,textDelay:i,showName:d,isHasName:h,currentConcatDialogPrev:p,fontSize:o,currentDialogKey:v,isSafari:oae,isFirefox:aae,miniAvatar:g,textDuration:a,font:s,textSizeState:l,lineLimit:c,isUseStroke:t,textboxOpacity:m})};function OP(t){return!!t.match(/[\u4e00-\u9fa5]|[\u0800-\u4e00]|[\uac00-\ud7ff]/)}function gs(t,e,r){return t.split(new RegExp("(?cS(o)).map(o=>uae(o)).map(o=>{const s=[];return o.forEach((u,l)=>{zf(u.type).with("SegmentType.String",()=>{const c=lae(u.value);s.push(...c.map(f=>({reactNode:f})))}).endsWith("SegmentType.Link",()=>{const c=u.value,f=C.jsx("span",{className:"__enhanced_text",children:C.jsxs("ruby",{children:[c.text,C.jsx("rt",{children:c.ruby})]},l+c.text)},c.text+`${l}`);s.push({reactNode:f,enhancedValue:c.values})})}),s}).slice(0,r?void 0:e)}function lae(t){if(!t)return[""];const e=[];let r="",n=OP(t[0]);const i=a=>/[!-\/:-@\[-`{-~\u2000-\u206F\u3000-\u303F\uff00-\uffef]/g.test(a);for(const a of t)if(a===" ")r&&(e.push(r),r=""),e.push(" "),n=!1;else if(OP(a)&&!i(a))!n&&r&&(e.push(r),r=""),e.push(a),n=!0;else{if(i(a)){r?(r+=a,e.push(r),r=""):e.length>0?e[e.length-1]+=a:e.push(a);continue}n&&r&&(e.push(r),r=""),r+=a,n=!1}return r&&e.push(r),e}function uae(t){const e=/(\[(.*?)\]\((.*?)\))|([^\[\]]+)/g,r=[];let n;for(;(n=e.exec(t))!==null;)if(n[1]){const i=n[2],a=n[3];let o=[],s="";if(a.match(/style=|tips=|ruby=|style-alltext=/)){o=cae(a);const u=o.find(l=>l.key==="ruby");u&&(s=u.value)}else s=a;r.push({type:"SegmentType.Link",value:{text:i,ruby:s,values:o}})}else{const i=n[0];r.push({type:"SegmentType.String",value:i})}return r.unshift({type:"SegmentType.String",value:""}),r}function cae(t){const e=[],r=/(\S+)=(.*?)(?=\s+\S+=|\s*$)/g;let n;for(;(n=r.exec(t))!==null;)e.push({key:n[1],value:n[2].replace(/~/g,":").trim()});return e}const fae=t=>{const e=te.getState().stage,r=te.getState().userData,n=te.dispatch;let i=Math.random().toString(),a=t.content;const o=He(t,"concat"),s=He(t,"notend"),u=He(t,"speaker"),l=He(t,"clear"),c=He(t,"vocal");o?(i=e.currentDialogKey,a=e.showText+a,n(Ge({key:"currentConcatDialogPrev",value:e.showText}))):n(Ge({key:"currentConcatDialogPrev",value:""})),n(Ge({key:"showText",value:a})),n(Ge({key:"vocal",value:""})),r.optionData.voiceInterruption===zc.no&&c===null||(n(Ge({key:"playVocal",value:""})),L.gameplay.performController.unmountPerform("vocal-play",!0)),n(Ge({key:"currentDialogKey",value:i}));const f=gS(r.optionData.textSpeed),d=gs(t.content,3).reduce((E,T)=>E+T.length,0),p=f*d;for(const E of t.args)if(E.key==="fontSize")switch(E.value){case"default":n(Ge({key:"showTextSize",value:-1}));break;case"small":n(Ge({key:"showTextSize",value:ti.small}));break;case"medium":n(Ge({key:"showTextSize",value:ti.medium}));break;case"large":n(Ge({key:"showTextSize",value:ti.large}));break}let v=e.showName;u!==null&&(v=u),l&&(v=""),n(Ge({key:"showName",value:v}));let g=null,m=0,y="",_="";for(const E of t.args)E.value===!0&&zf(E.key).with("left",()=>{y="left"}).with("right",()=>{y="right"}).endsWith("center",()=>{y="center"}),E.key==="figureId"&&(_=`${E.value.toString()}`);let x=80;const b=(E=!1)=>{let T=x+(Math.random()*60-30);Math.abs(T-x)<5&&(T=x+Math.sign(T-x)*5),x=Math.max(15,Math.min(T,100));const P=te.getState().stage.figureAssociatedAnimation.find(M=>M.targetId===_),k=_||`fig-${y}`;E&&(x=0),u_({audioLevel:x,OPEN_THRESHOLD:50,HALF_OPEN_THRESHOLD:25,currentMouthValue:0,lerpSpeed:1,key:k,animationItem:P,pos:y}),E||(g=setTimeout(b,50))};c?Bie(t):(_||y)&&(m=d*250,b());const S=TS();let w=750-r.optionData.textSpeed*250;return s&&(w=0),{performName:S,duration:p+w+m,isHoldOn:!1,stopFunction:()=>{L.events.textSettle.emit(),g&&(b(!0),clearTimeout(g))},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0,goNextWhenOver:s}};var yS={},Qc={document:{}},DF=Object.prototype.hasOwnProperty,BF=function(t){return qv(t)?t.toLowerCase():t},Ec=Array.isArray,hae=function(t){return qv(t)?t.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)|32)}):t};"I".toLowerCase()!=="i"&&(BF=hae);var dae,_S=Object.prototype.toString,jF=Object.getPrototypeOf,qg=XF("ng");Qc.angular||(Qc.angular={});Qc.document.documentMode;function pae(t){if(t==null||SS(t))return!1;if(Ec(t)||qv(t)||dae)return!0;var e="length"in Object(t)&&t.length;return bS(e)&&(e>=0&&(e-1 in t||t instanceof Array)||typeof t.item=="function")}function Dt(t,e,r){var n,i;if(t)if(VF(t))for(n in t)n!=="prototype"&&n!=="length"&&n!=="name"&&t.hasOwnProperty(n)&&e.call(r,t[n],n,t);else if(Ec(t)||pae(t)){var a=typeof t!="object";for(n=0,i=t.length;n"u"}function sl(t){return typeof t<"u"}function UF(t){return t!==null&&typeof t=="object"}function $F(t){return t!==null&&typeof t=="object"&&!jF(t)}function qv(t){return typeof t=="string"}function bS(t){return typeof t=="number"}function VF(t){return typeof t=="function"}function SS(t){return t&&t.window===t}function GF(t){return t&&t.$evalAsync&&t.$watch}var gae=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;function yae(t){return t&&bS(t.length)&&gae.test(_S.call(t))}function _ae(t){return _S.call(t)==="[object ArrayBuffer]"}function xae(t,e){var r=[],n=[];if(e){if(yae(e)||_ae(e))throw qg("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t===e)throw qg("cpi","Can't copy! Source and destination are identical.");return Ec(e)?e.length=0:Dt(e,function(s,u){u!=="$$hashKey"&&delete e[u]}),r.push(t),n.push(e),i(t,e)}return a(t);function i(s,u){var l=u.$$hashKey,c;if(Ec(s))for(var f=0,h=s.length;f=0)return"...";e.push(n)}return n})}function RP(t){return typeof t=="function"?t.toString().replace(/ \{[\s\S]*$/,""):mae(t)?"undefined":typeof t!="string"?Eae(t):t}function XF(t,e){return e=e||Error,function(){var r=2,n=arguments,i=n[0],a="["+(t?t+":":"")+i+"] ",o=n[1],s,u;for(a+=o.replace(/\{\d+\}/g,function(l){var c=+l.slice(1,-1),f=c+r;return f{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],i=e;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0,a=r={callback:n,next:null,prev:r};return a.prev?a.prev.next=a:e=a,function(){!i||e===null||(i=!1,a.next?a.next.prev=a.prev:r=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}const _P={notify(){},get:()=>[]};function jre(t,e){let r,n=_P,i=0,a=!1;function o(v){c();const g=n.subscribe(v);let m=!1;return()=>{m||(m=!0,g(),f())}}function s(){n.notify()}function u(){p.onStateChange&&p.onStateChange()}function l(){return a}function c(){i++,r||(r=e?e.addNestedSub(u):t.subscribe(u),n=Bre())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=_P)}function h(){a||(a=!0,c())}function d(){a&&(a=!1,f())}const p={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:d,getListeners:()=>n};return p}const Ure=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$re=Ure?ne.useLayoutEffect:ne.useEffect;function yF({store:t,context:e,children:r,serverState:n,stabilityCheck:i="once",noopCheck:a="once"}){const o=ne.useMemo(()=>{const l=jre(t);return{store:t,subscription:l,getServerState:n?()=>n:void 0,stabilityCheck:i,noopCheck:a}},[t,n,i,a]),s=ne.useMemo(()=>t.getState(),[t]);$re(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==t.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,s]);const u=e||Eo;return ne.createElement(u.Provider,{value:o},r)}function _F(t=Eo){const e=t===Eo?fF:nS(t);return function(){const{store:n}=e();return n}}const Vre=_F();function Gre(t=Eo){const e=t===Eo?Vre:_F(t);return function(){return e().dispatch}}const Lr=Gre();Ere(yre.useSyncExternalStoreWithSelector);xre(XI.unstable_batchedUpdates);const _n=()=>{const t=Lr();return{playSeEnter:()=>{t(Ge({key:"uiSe",value:iF}))},playSeClick:()=>{t(Ge({key:"uiSe",value:aF}))},playSePageChange:()=>{t(Ge({key:"uiSe",value:Zte}))},playSeDialogOpen:()=>{t(Ge({key:"uiSe",value:Jte}))},playSeSwitch:()=>{t(Ge({key:"uiSe",value:Qte}))}}},uS=()=>({playSeEnter:()=>{te.dispatch(Ge({key:"uiSe",value:iF}))},playSeClick:()=>{te.dispatch(Ge({key:"uiSe",value:aF}))}}),Xre=[{reg:/\\\\/g,val:"\\"},{reg:/\\\|/g,val:"|"},{reg:/\\:/g,val:":"},{reg:/\\,/g,val:","},{reg:/\\;/g,val:";"},{reg:/\\./g,val:"."}],cS=t=>{let e=t;for(let r of Xre)e=e.replaceAll(r.reg,r.val);return e};function zre(t){return Kv.parseScssToWebgalStyleObj(t)}function wi(t){const[e,r]=ne.useState(t);return{_value:e,set:function(n){this._value=n,r(n)},get value(){return this._value},set value(n){this.set(n)}}}function Wre(t){if(t.sheet)return t.sheet;for(var e=0;e0?Gr(hu,--Pn):0,jl--,sr===10&&(jl=1,Yv--),sr}function Bn(){return sr=Pn2||Kc(sr)>3?"":" "}function ane(t,e){for(;--e&&Bn()&&!(sr<48||sr>102||sr>57&&sr<65||sr>70&&sr<97););return Xf(t,pd()+(e<6&&Ji()==32&&Bn()==32))}function l_(t){for(;Bn();)switch(sr){case t:return Pn;case 34:case 39:t!==34&&t!==39&&l_(sr);break;case 40:t===41&&l_(t);break;case 92:Bn();break}return Pn}function one(t,e){for(;Bn()&&t+sr!==47+10;)if(t+sr===42+42&&Ji()===47)break;return"/*"+Xf(e,Pn-1)+"*"+Wv(t===47?t:Bn())}function sne(t){for(;!Kc(Ji());)Bn();return Xf(t,Pn)}function lne(t){return TF(md("",null,null,null,[""],t=EF(t),0,[0],t))}function md(t,e,r,n,i,a,o,s,u){for(var l=0,c=0,f=o,h=0,d=0,p=0,v=1,g=1,m=1,y=0,_="",x=i,b=a,S=n,w=_;g;)switch(p=y,y=Bn()){case 40:if(p!=108&&Gr(w,f-1)==58){s_(w+=ot(vd(y),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:w+=vd(y);break;case 9:case 10:case 13:case 32:w+=ine(p);break;case 92:w+=ane(pd()-1,7);continue;case 47:switch(Ji()){case 42:case 47:yh(une(one(Bn(),pd()),e,r),u);break;default:w+="/"}break;case 123*v:s[l++]=Ui(w)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:m==-1&&(w=ot(w,/\f/g,"")),d>0&&Ui(w)-f&&yh(d>32?bP(w+";",n,r,f-1):bP(ot(w," ","")+";",n,r,f-2),u);break;case 59:w+=";";default:if(yh(S=xP(w,e,r,l,c,i,s,_,x=[],b=[],f),a),y===123)if(c===0)md(w,e,S,S,x,a,f,s,b);else switch(h===99&&Gr(w,3)===110?100:h){case 100:case 108:case 109:case 115:md(t,S,S,n&&yh(xP(t,S,S,0,0,i,s,_,i,x=[],f),b),i,b,f,s,n?x:b);break;default:md(w,S,S,S,[""],b,0,s,b)}}l=c=d=0,v=m=1,_=w="",f=o;break;case 58:f=1+Ui(w),d=p;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&nne()==125)continue}switch(w+=Wv(y),y*v){case 38:m=c>0?1:(w+="\f",-1);break;case 44:s[l++]=(Ui(w)-1)*m,m=1;break;case 64:Ji()===45&&(w+=vd(Bn())),h=Ji(),c=f=Ui(_=w+=sne(pd())),y++;break;case 45:p===45&&Ui(w)==2&&(v=0)}}return a}function xP(t,e,r,n,i,a,o,s,u,l,c){for(var f=i-1,h=i===0?a:[""],d=dS(h),p=0,v=0,g=0;p0?h[m]+" "+y:ot(y,/&\f/g,h[m])))&&(u[g++]=_);return Hv(t,e,r,i===0?fS:s,u,l,c)}function une(t,e,r){return Hv(t,e,r,xF,Wv(rne()),qc(t,2,-2),0)}function bP(t,e,r,n){return Hv(t,e,r,hS,qc(t,0,n),qc(t,n+1,-1),n)}function El(t,e){for(var r="",n=dS(t),i=0;i6)switch(Gr(t,e+1)){case 109:if(Gr(t,e+4)!==45)break;case 102:return ot(t,/(.+:)(.+)-([^]+)/,"$1"+at+"$2-$3$1"+up+(Gr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~s_(t,"stretch")?AF(ot(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Gr(t,e+1)!==115)break;case 6444:switch(Gr(t,Ui(t)-3-(~s_(t,"!important")&&10))){case 107:return ot(t,":",":"+at)+t;case 101:return ot(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+at+(Gr(t,14)===45?"inline-":"")+"box$3$1"+at+"$2$3$1"+Yr+"$2box$3")+t}break;case 5936:switch(Gr(t,e+11)){case 114:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return at+t+Yr+t+t}return t}var _ne=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case hS:e.return=AF(e.value,e.length);break;case bF:return El([Uu(e,{value:ot(e.value,"@","@"+at)})],i);case fS:if(e.length)return tne(e.props,function(a){switch(ene(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return El([Uu(e,{props:[ot(a,/:(read-\w+)/,":"+up+"$1")]})],i);case"::placeholder":return El([Uu(e,{props:[ot(a,/:(plac\w+)/,":"+at+"input-$1")]}),Uu(e,{props:[ot(a,/:(plac\w+)/,":"+up+"$1")]}),Uu(e,{props:[ot(a,/:(plac\w+)/,Yr+"input-$1")]})],i)}return""})}},xne=[_ne],bne=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var g=v.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=e.stylisPlugins||xne,a={},o,s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var g=v.getAttribute("data-emotion").split(" "),m=1;m=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var wne={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ene=/[A-Z]|^ms/g,Tne=/_EMO_([^_]+?)_([^]*?)_EMO_/g,CF=function(e){return e.charCodeAt(1)===45},wP=function(e){return e!=null&&typeof e!="boolean"},Yg=dne(function(t){return CF(t)?t:t.replace(Ene,"-$&").toLowerCase()}),EP=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Tne,function(n,i,a){return $i={name:i,styles:a,next:$i},i})}return wne[e]!==1&&!CF(e)&&typeof r=="number"&&r!==0?r+"px":r};function Zc(t,e,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return $i={name:r.name,styles:r.styles,next:$i},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)$i={name:n.name,styles:n.styles,next:$i},n=n.next;var i=r.styles+";";return i}return Ane(t,e,r)}case"function":{if(t!==void 0){var a=$i,o=r(t);return $i=a,Zc(t,e,o)}break}}if(e==null)return r;var s=e[r];return s!==void 0?s:r}function Ane(t,e,r){var n="";if(Array.isArray(r))for(var i=0;ia.stage.replacedUIlable),n=(a,o)=>{var u;const s=(r==null?void 0:r[a])??a;if(Object.keys(e.value.classNameStyles).includes(s)){const l=ac(((u=e.value.classNameStyles)==null?void 0:u[s])??"");return`${o} ${l}`}return o},i=async()=>{ge.debug("更新 Scss 文件",t);const o=(await Wc.get(`game/template/${t}`)).data;e.set(zre(o))};return ne.useEffect(()=>{i()},[]),ne.useEffect(()=>{kne(e.value.others)},[e.value.others]),Mne(i),n}function Mne(t){const e=()=>{t()};ne.useEffect(()=>(L.events.styleUpdate.on(e),()=>L.events.styleUpdate.off(e)),[])}class vS{constructor(e,r){Ae(this,"text");Ae(this,"jump");Ae(this,"jumpToScene");Ae(this,"showCondition");Ae(this,"enableCondition");this.text=cS(e),this.jump=r,this.jumpToScene=r.match(new RegExp("(?"),n=r.length>1?r[0]:null,a=(r.length>1?r[1]:r[0]).split(new RegExp("(?{const r=t.content.split(new RegExp("(?vS.parse(n));return ea.render(C.jsx(yF,{store:te,children:C.jsx(Nne,{chooseOptions:r})}),document.getElementById("chooseContainer")),{performName:"choose",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{ea.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}};function Nne(t){const r=te.getState().userData.optionData.textboxFont===Zi.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:n,playSeClick:i}=uS(),a=pS("Stage/Choose/choose.scss"),o=s=>s.filter((u,l)=>d_(u.showCondition)).map((u,l)=>{const c=d_(u.enableCondition),f=c?a("Choose_item",gh.Choose_item):a("Choose_item_disabled",gh.Choose_item_disabled),h=c?()=>{i(),u.jumpToScene?rF(u.jump,u.text):nF(u.jump),L.gameplay.performController.unmountPerform("choose")}:()=>{};return C.jsx("div",{className:a("Choose_item_outer",gh.Choose_item_outer),children:C.jsx("div",{className:f,style:{fontFamily:r},onClick:h,onMouseEnter:n,children:u.text})},u.jump+l)});return C.jsx("div",{className:a("Choose_Main",gh.Choose_Main),children:o(t.chooseOptions)})}const Lne=t=>(ge.debug(`脚本内注释${t.content}`),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Dne=t=>(t.content!==""&&t.content!=="none"?te.dispatch(Ge({key:"enableFilm",value:t.content})):te.dispatch(Ge({key:"enableFilm",value:""})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Bne="_Choose_Main_4xkm5_1",jne="_Choose_item_4xkm5_13",Une="_glabalDialog_container_inner_4xkm5_28",$ne="_glabalDialog_container_4xkm5_28",Vne="_title_4xkm5_47",Gne="_button_4xkm5_59",Vs={Choose_Main:Bne,Choose_item:jne,glabalDialog_container_inner:Une,glabalDialog_container:$ne,title:Vne,button:Gne},Xne=t=>{const e=t.content.toString().trim(),r=He(t,"title"),n=(r===0?"Please Input":r)??"Please Input",i=He(t,"buttonText"),a=(i===0?"OK":i)??"OK",s=te.getState().userData.optionData.textboxFont===Zi.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:u,playSeClick:l}=uS(),c=C.jsx("div",{style:{fontFamily:s},className:Vs.glabalDialog_container,children:C.jsxs("div",{className:Vs.glabalDialog_container_inner,children:[C.jsx("div",{className:Vs.title,children:n}),C.jsx("input",{id:"user-input",className:Vs.Choose_item}),C.jsx("div",{onMouseEnter:u,onClick:()=>{const f=document.getElementById("user-input");f&&te.dispatch(Pk({key:e,value:((f==null?void 0:f.value)??"")===""?" ":(f==null?void 0:f.value)??""})),l(),L.gameplay.performController.unmountPerform("userInput"),tn()},className:Vs.button,children:a})]})});return ea.render(C.jsx("div",{className:Vs.Choose_Main,children:c}),document.getElementById("chooseContainer")),{performName:"userInput",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{ea.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}},zne="_FullScreenPerform_main_7er8a_2",Wne="_FullScreenPerform_element_7er8a_9",Yne="_fullScreen_video_7er8a_17",Hne="_fadeIn_7er8a_74",qne="_intro_showSoftly_7er8a_1",Kne="_slideIn_7er8a_80",Zne="_typingEffect_7er8a_86",Qne="_typing_7er8a_86",Jne="_blinkCursor_7er8a_1",eie="_pixelateEffect_7er8a_95",tie="_pixelateAnimation_7er8a_1",rie="_revealAnimation_7er8a_101",nie="_videoContainer_7er8a_115",Bi={FullScreenPerform_main:zne,FullScreenPerform_element:Wne,fullScreen_video:Yne,fadeIn:Hne,intro_showSoftly:qne,slideIn:Kne,typingEffect:Zne,typing:Qne,blinkCursor:Jne,pixelateEffect:eie,pixelateAnimation:tie,revealAnimation:rie,videoContainer:nie},iie=t=>{const e=`introPerform${Math.random().toString()}`;let r,n="rgba(0, 0, 0, 1)",i="rgba(255, 255, 255, 1)";const a=(b,S=0)=>{switch(b){case"fadeIn":return Bi.fadeIn;case"slideIn":return Bi.slideIn;case"typingEffect":return`${Bi.typingEffect} ${S}`;case"pixelateEffect":return Bi.pixelateEffect;case"revealAnimation":return Bi.revealAnimation;default:return Bi.fadeIn}};let o=Bi.fadeIn,s=1500,u=!1;for(const b of t.args){if(b.key==="backgroundColor"&&(n=b.value||"rgba(0, 0, 0, 1)"),b.key==="fontColor"&&(i=b.value||"rgba(255, 255, 255, 1)"),b.key==="fontSize")switch(b.value){case"small":r="280%";break;case"medium":r="350%";break;case"large":r="420%";break}if(b.key==="animation"&&(o=a(b.value)),b.key==="delayTime"){const S=parseInt(b.value.toString(),10);s=isNaN(S)?s:S}b.key==="hold"&&b.value===!0&&(u=!0)}const l={background:n,color:i,fontSize:r||"350%",width:"100%",height:"100%"},c=t.content.split(new RegExp("(?cS(b));let h=1e3+s*c.length;const d=u?1e3*60*60*24:1e3+s*c.length;let p=!0,v=setTimeout(()=>{p=!1},h),g=setTimeout(()=>{});const m=()=>{const b=document.getElementById("introContainer");if(h-=s,clearTimeout(v),v=setTimeout(()=>{p=!1},h),b){const S=b.childNodes[0].childNodes[0].childNodes,w=S.length;S.forEach((E,T)=>{const A=Number(E.style.animationDelay.split("ms")[0]);A>0&&(E.style.animationDelay=`${A-s}ms`),T===w-1&&(A===0?(clearTimeout(g),L.gameplay.performController.unmountPerform(e)):(clearTimeout(g),u||(g=setTimeout(()=>{L.gameplay.performController.unmountPerform(e)},h))))})}};L.events.userInteractNext.on(m);const y=c.map((b,S)=>C.jsxs("div",{style:{animationDelay:`${s*S}ms`},className:o,children:[b,b===""?" ":""]},"introtext"+S+Math.random().toString())),_=C.jsx("div",{style:l,children:C.jsx("div",{style:{padding:"3em 4em 3em 4em"},children:y})});ea.render(_,document.getElementById("introContainer"));const x=document.getElementById("introContainer");return x&&(x.style.display="block"),{performName:e,duration:d,isHoldOn:!1,stopFunction:()=>{const b=document.getElementById("introContainer");b&&(b.style.display="none"),L.events.userInteractNext.off(m)},blockingNext:()=>p,blockingAuto:()=>p,stopTimeout:void 0,goNextWhenOver:!0}},aie=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),oie=t=>{let e=t.content;return(t.content==="none"||t.content==="")&&(e=""),te.dispatch(Ge({key:"miniAvatar",value:e})),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},sie="modulepreload",lie=function(t,e){return new URL(t,e).href},PP={},uie=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=lie(a,n),a in PP)return;PP[a]=!0;const o=a.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(!!n)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===a&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":sie,o||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},RF=new Map;function cie(t){return t?typeof t=="string"?t:t():null}function IF(t){const e=cie(t);return e||(ge.error("Get name of perform failed. There no name of the perform."),"")}function _we(t,e){if(!e||typeof e!="function")throw new Error(`"${t}" is not a callback.`);RF.set(IF(t),e)}function fie(t,e=[]){const r=RF.get(IF(t));if(!r||!(r instanceof Function))throw ge.error(`Can't call the perform named "${t}"`),new Error(`"${t}" don't have the pixiPerform callback.`);return r(...e)}uie(()=>import("./initRegister-2c254553.js"),[],import.meta.url);const hie=t=>{const e="PixiPerform"+t.content;L.gameplay.performController.performList.forEach(a=>{if(a.performName===e)return{performName:"none",duration:0,isOver:!1,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}});const r=fie(t.content),{container:n,tickerKey:i}=r;return{performName:e,duration:0,isHoldOn:!0,stopFunction:()=>{var a,o;ge.warn("现在正在卸载pixi演出"),n.destroy({texture:!0,baseTexture:!0}),(a=L.gameplay.pixiStage)==null||a.effectsContainer.removeChild(n),(o=L.gameplay.pixiStage)==null||o.removeAnimation(i)},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},die=t=>{var a;ge.debug("play SE");let e="effect-sound";L.gameplay.performController.unmountPerform(e,!0);let r=t.content,n=!1;He(t,"id")&&(e=`effect-sound-${((a=He(t,"id"))==null?void 0:a.toString())??""}`,L.gameplay.performController.unmountPerform(e,!0),n=!0);let i=!1;return{performName:"none",blockingAuto(){return!1},blockingNext(){return!1},isHoldOn:!1,stopFunction(){},stopTimeout:void 0,duration:1e3*60*60,arrangePerformPromise:new Promise(o=>{setTimeout(()=>{var p;const s=He(t,"volume");let u=document.createElement("audio");u.src=r,n&&(u.loop=!0);const l=te.getState().userData,c=l.optionData.volumeMain,f=typeof s=="number"&&s>=0&&s<=100?s:100,h=c*.01*(((p=l.optionData)==null?void 0:p.seVolume)??100)*.01*f*.01;u.volume=h,u.currentTime=0;const d={performName:e,duration:1e3*60*60,isHoldOn:n,skipNextCollect:!0,stopFunction:()=>{u.pause()},blockingNext:()=>!1,blockingAuto:()=>n?!1:!i,stopTimeout:void 0};o(d),u==null||u.play(),u.onended=()=>{for(const v of L.gameplay.performController.performList)v.performName===e&&(i=!0,v.stopFunction(),L.gameplay.performController.unmountPerform(v.performName))}},1)})}},pie=t=>{const e=te.getState().userData,r=e.optionData.volumeMain,n=r*.01*e.optionData.vocalVolume*.01,i=r*.01*e.optionData.bgmVolume*.01,a=TS();let o=He(t,"skipOff"),s=!1;o&&(s=!0),ea.render(C.jsx("div",{className:Bi.videoContainer,children:C.jsx("video",{className:Bi.fullScreen_video,id:"playVideoElement",src:t.content,autoPlay:!0})}),document.getElementById("videoContainer"));let u=!1;return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>s,blockingAuto:()=>!0,stopTimeout:void 0,arrangePerformPromise:new Promise(l=>{setTimeout(()=>{let c=document.getElementById("playVideoElement");if(c!==null){c.currentTime=0,c.volume=i;const f=()=>{for(const y of L.gameplay.performController.performList)y.performName===a&&(u=!0,y.stopFunction(),L.gameplay.performController.unmountPerform(y.performName))},h=()=>{f()};L.events.fullscreenDbClick.on(h);const d={performName:a,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{L.events.fullscreenDbClick.off(h);const y=document.getElementById("currentBgm");y&&(y.volume=i.toString());const _=document.getElementById("currentVocal");y&&(_.volume=n.toString()),ea.render(C.jsx("div",{}),document.getElementById("videoContainer"))},blockingNext:()=>s,blockingAuto:()=>!u,stopTimeout:void 0,goNextWhenOver:!0};l(d);const p=0,v=0,g=document.getElementById("currentBgm");g&&(g.volume=v.toString());const m=document.getElementById("currentVocal");g&&(m.volume=p.toString()),c==null||c.play(),c.onended=()=>{f()}}},1)})}},vie=t=>{var o;te.getState().stage.currentDialogKey;const e=t.content,r=En(e),n=(((o=He(t,"target"))==null?void 0:o.toString())??"default_id").toString(),i=`${n}-${e}-${r}`;let a;return setTimeout(()=>{var u,l;(u=L.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n);const s=lp(e,n,r);s&&(ge.debug(`动画${e}作用在${n}`,r),(l=L.gameplay.pixiStage)==null||l.registerAnimation(s,i,n))},0),a=()=>{setTimeout(()=>{var s;te.getState().stage.currentDialogKey,(s=L.gameplay.pixiStage)==null||s.removeAnimationWithSetEffects(i)},0)},{performName:i,duration:r,isHoldOn:!1,stopFunction:a,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function mie(t,e){const r=L.gameplay.pixiStage.getStageObjByKey(t);function n(){r&&(r.pixiContainer.alpha=0,r.pixiContainer.blur=0)}function i(){r&&(r.pixiContainer.alpha=1,r.pixiContainer.blur=5)}function a(o){if(r){const s=r.pixiContainer,u=L.gameplay.pixiStage.frameDuration,l=e/u*o,c=1/l,f=5/l;s.alpha<1&&(s.alpha+=c),s.blur<5&&(s.blur+=f)}}return{setStartState:n,setEndState:i,tickerFunc:a}}const gie=[{name:"universalSoftIn",animationGenerateFunc:SM},{name:"universalSoftOff",animationGenerateFunc:wM},{name:"testblur",animationGenerateFunc:mie}],yie=t=>{var s,u,l;te.getState().stage.currentDialogKey;const e=t.content,r=He(t,"duration")??0,n=((s=He(t,"target"))==null?void 0:s.toString())??"0",i=`${n}-${e}-${r}`,a=_ie(e);let o=()=>{};if(a){ge.debug(`动画${e}作用在${n}`,r);const c=a(n,r);(u=L.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n),(l=L.gameplay.pixiStage)==null||l.registerAnimation(c,i,n),o=()=>{var f;te.getState().stage.currentDialogKey,(f=L.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(i)}}return{performName:i,duration:r,isHoldOn:!1,stopFunction:o,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function _ie(t){const e=gie.find(r=>r.name===t);return ge.debug("装载动画",e),e?e.animationGenerateFunc:null}const xie=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),bie=t=>{var l;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;try{n=JSON.parse(r)}catch{n=[]}const i={name:e,effects:n};L.animationManager.addAnimation(i);const a=En(e),o=((l=He(t,"target"))==null?void 0:l.toString())??"0",s=`${o}-${e}-${a}`;let u=()=>{};return setTimeout(()=>{var f,h;(f=L.gameplay.pixiStage)==null||f.stopPresetAnimationOnTarget(o);const c=lp(e,o,a);c&&(ge.debug(`动画${e}作用在${o}`,a),(h=L.gameplay.pixiStage)==null||h.registerAnimation(c,s,o))},0),u=()=>{setTimeout(()=>{var c;te.getState().stage.currentDialogKey,(c=L.gameplay.pixiStage)==null||c.removeAnimationWithSetEffects(s)},0)},{performName:s,duration:a,isHoldOn:!1,stopFunction:u,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Sie(t){return t.content==="hide"?te.dispatch(Ge({key:"isDisableTextbox",value:!0})):te.dispatch(Ge({key:"isDisableTextbox",value:!1})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}}const wie=t=>{var c;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;const i=He(t,"duration"),a=((c=He(t,"target"))==null?void 0:c.toString())??"0";try{const f=JSON.parse(r);n=Yc(a,f,i)}catch{n=[]}const o={name:e,effects:n};L.animationManager.addAnimation(o);const s=Tie(e),u=`${a}-${e}-${s}`;let l=()=>{};return setTimeout(()=>{var h,d;(h=L.gameplay.pixiStage)==null||h.stopPresetAnimationOnTarget(a);const f=Eie(e,a,s);f&&(ge.debug(`动画${e}作用在${a}`,s),(d=L.gameplay.pixiStage)==null||d.registerAnimation(f,u,a))},0),l=()=>{setTimeout(()=>{var f;te.getState().stage.currentDialogKey,(f=L.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(u)},0)},{performName:u,duration:s,isHoldOn:!1,stopFunction:l,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Eie(t,e,r){const n=L.animationManager.getAnimations().find(i=>i.name===t);if(n){const i=n.effects.map(a=>{const o=Jt({...Kb,duration:0});return Object.assign(o,a),o.duration=a.duration,o});return ge.debug("装载自定义动画",i),tF(i,e,r)}return null}function Tie(t){const e=L.animationManager.getAnimations().find(r=>r.name===t);if(e){let r=0;return e.effects.forEach(n=>{r+=n.duration}),r}return 0}const Aie=t=>{let e="0";for(const r of t.args)r.key==="target"&&(e=r.value.toString());return He(t,"enter")&&L.animationManager.nextEnterAnimationName.set(e,He(t,"enter").toString()),He(t,"exit")&&L.animationManager.nextExitAnimationName.set(e+"-off",He(t,"exit").toString()),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},Cie=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),ge.info(`解锁BGM:${r},路径:${e},所属系列:${n}`),te.dispatch(Wk({name:r,url:e,series:n}));const i=te.getState().userData;return Os.setItem(L.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},Pie=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),ge.info(`解锁CG:${r},路径:${e},所属系列:${n}`),te.dispatch(zk({name:r,url:e,series:n}));const i=te.getState().userData;return Os.setItem(L.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},mS=(t,e=!0)=>{t&&L.backlogManager.makeBacklogEmpty(),e&&L.sceneManager.resetScene(),L.gameplay.performController.removeAllPerform(),L.gameplay.resetGamePlay();const r=Jt(Ck),n=te.getState().stage.GameVar;te.dispatch(ov(r)),e||te.dispatch(Ge({key:"GameVar",value:n}))},Oie={saveData:[],quickSaveData:null},kF=Qp({name:"saveData",initialState:Jt(Oie),reducers:{setFastSave:(t,e)=>{t.quickSaveData=e.payload},resetFastSave:t=>{t.quickSaveData=null},resetSaves:t=>{t.quickSaveData=null,t.saveData=[]},saveGame:(t,e)=>{t.saveData[e.payload.index]=e.payload.saveData},replaceSaveGame:(t,e)=>{t.saveData=e.payload}}}),Oa=kF.actions,Rie=kF.reducer,Iie=t=>{mS(!0);const e=te.dispatch,r=Nn("start.txt",Fn.scene);return setTimeout(()=>{L.sceneManager.resetScene()},5),e(Oa.resetFastSave()),hp(),ua(r).then(n=>{L.sceneManager.sceneData.currentScene=ca(n,"start.txt",r)}),e(rt({component:"showTitle",visibility:!0})),AS(te.getState().GUI.titleBgm),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},kie=t=>(nF(t.content),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Mie=t=>(L.gameplay.performController.performList.forEach(e=>{if(e.performName.match(/PixiPerform/)){ge.warn("pixi 被脚本重新初始化",e.performName);for(let r=0;r{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),ut={audioContext:new AudioContext,source:null,analyser:void 0,dataArray:void 0,audioLevelInterval:setInterval(()=>{},0),blinkTimerID:setTimeout(()=>{},0),maxAudioLevel:0},Fie=t=>(ut.maxAudioLevel=Math.max(t,ut.maxAudioLevel),{OPEN_THRESHOLD:ut.maxAudioLevel*.75,HALF_OPEN_THRESHOLD:ut.maxAudioLevel*.5}),Nie=t=>{let e=!1;function r(){var n;e||t.animationEndTime&&Date.now()>t.animationEndTime||(e=!0,(n=L.gameplay.pixiStage)==null||n.performBlinkAnimation(t.key,t.animationItem,"closed",t.pos),ut.blinkTimerID=setTimeout(()=>{var a;(a=L.gameplay.pixiStage)==null||a.performBlinkAnimation(t.key,t.animationItem,"open",t.pos),e=!1;const i=Math.random()*300+3500;ut.blinkTimerID=setTimeout(r,i)},200))}r()},Lie=(t,e,r)=>{t.getByteFrequencyData(e);let n=0;for(let i=0;i{var h,d;const{audioLevel:e,OPEN_THRESHOLD:r,HALF_OPEN_THRESHOLD:n,currentMouthValue:i,lerpSpeed:a,key:o,animationItem:s,pos:u}=t;let l;e>r?l=1:e>n?l=.5:l=0;const c=i+(l-i)*a;(h=L.gameplay.pixiStage)==null||h.setModelMouthY(o,e);let f;c>.75?f="open":c>.25?f="half_open":f="closed",s!==void 0&&((d=L.gameplay.pixiStage)==null||d.performMouthSyncAnimation(o,s,f,u))};class Die{constructor(e){Ae(this,"subject");Ae(this,"result");Ae(this,"isEnd",!1);this.subject=e}with(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this}endsWith(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this.evaluate()}default(e){return this.isEnd||(this.result=e()),this.evaluate()}evaluate(){return this.result}}function zf(t){return new Die(t)}const Bie=t=>{ge.debug("play vocal");const e="vocal-play",r=He(t,"vocal"),n=He(t,"volume");let i;i=te.getState().stage;let a="",o="";const s=i.freeFigure,u=i.figureAssociatedAnimation;let l=0,c=0;const f=1;let h=document.getElementById("currentVocal");L.gameplay.performController.unmountPerform("vocal-play",!0),h!==null&&(h.currentTime=0,h.pause());for(const p of t.args)p.value===!0&&zf(p.key).with("left",()=>{a="left"}).with("right",()=>{a="right"}).endsWith("center",()=>{a="center"}),p.key==="figureId"&&(o=`${p.value.toString()}`);te.dispatch(Ge({key:"playVocal",value:r})),te.dispatch(Ge({key:"vocal",value:r}));let d=!1;return{arrangePerformPromise:new Promise(p=>{setTimeout(()=>{let v=document.getElementById("currentVocal");if(typeof n=="number"&&n>=0&&n<=100?te.dispatch(Ge({key:"vocalVolume",value:n})):te.dispatch(Ge({key:"vocalVolume",value:100})),v!==null){v.currentTime=0;const g={performName:e,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{clearInterval(ut.audioLevelInterval),v.pause(),o=o||`fig-${a}`;const y=u.find(_=>_.targetId===o);u_({audioLevel:0,OPEN_THRESHOLD:1,HALF_OPEN_THRESHOLD:1,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:y,pos:a}),clearTimeout(ut.blinkTimerID)},blockingNext:()=>!1,blockingAuto:()=>!d,skipNextCollect:!0,stopTimeout:void 0};L.gameplay.performController.arrangeNewPerform(g,t,!1),o=o||`fig-${a}`;const m=u.find(y=>y.targetId===o);if(m){const y=s.find(b=>b.key===o);if(y&&(a=y.basePosition),!ut.audioContext){let b;b=new AudioContext,ut.analyser=b.createAnalyser(),ut.analyser.fftSize=256,ut.dataArray=new Uint8Array(ut.analyser.frequencyBinCount)}ut.analyser||(ut.analyser=ut.audioContext.createAnalyser(),ut.analyser.fftSize=256),l=ut.analyser.frequencyBinCount,ut.dataArray=new Uint8Array(l);let _=document.getElementById("currentVocal");ut.source||(ut.source=ut.audioContext.createMediaElementSource(_),ut.source.connect(ut.analyser)),ut.analyser.connect(ut.audioContext.destination),ut.audioLevelInterval=setInterval(()=>{const b=Lie(ut.analyser,ut.dataArray,l),{OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w}=Fie(b);u_({audioLevel:b,OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:m,pos:a})},50);let x;x=Date.now()+1e4,Nie({key:o,animationItem:m,pos:a,animationEndTime:x}),setTimeout(()=>{clearTimeout(ut.blinkTimerID)},1e4)}v==null||v.play(),v.onended=()=>{for(const y of L.gameplay.performController.performList)y.performName===e&&(d=!0,y.stopFunction(),L.gameplay.performController.unmountPerform(y.performName))}}},1)})}};function gS(t){switch(t){case hn.slow:return 80;case hn.normal:return 35;case hn.fast:return 3}}function MF(t){switch(t){case hn.slow:return 800;case hn.normal:return 350;case hn.fast:return 200}}function FF(){const t=Ne(r=>r.userData.optionData.textboxFont);function e(){return zf(t).with(Zi.song,()=>'"思源宋体", serif').with(Zi.lxgw,()=>'"LXGW", serif').with(Zi.hei,()=>'"WebgalUI", serif').default(()=>'"WebgalUI", serif')}return e()}function c_(t){switch(t){case 0:return 155;case 1:return 205;case 2:return 230;default:return 205}}const jie="_TextBox_EventHandler_1jt23_2",Uie="_TextBox_Container_1jt23_10",$ie="_showSoftly_1jt23_1",Vie="_TextBox_main_1jt23_18",Gie="_TextBox_main_miniavatarOff_1jt23_39",Xie="_TextBox_Background_1jt23_43",zie="_TextBox_textElement_start_1jt23_56",Wie="_TextDelayShow_1jt23_1",Yie="_outer_1jt23_64",Hie="_inner_1jt23_78",qie="_zhanwei_1jt23_89",Kie="_TextBox_textElement_Settled_1jt23_97",Zie="_TextBox_showName_1jt23_104",Qie="_TextBox_ShowName_Background_1jt23_117",Jie="_miniAvatarContainer_1jt23_132",eae="_miniAvatarImg_1jt23_142",tae="_nameContainer_1jt23_150",rae="_outerName_1jt23_156",nae="_innerName_1jt23_167",iae="_text_1jt23_174",yt={TextBox_EventHandler:jie,TextBox_Container:Uie,showSoftly:$ie,TextBox_main:Vie,TextBox_main_miniavatarOff:Gie,TextBox_Background:Xie,TextBox_textElement_start:zie,TextDelayShow:Wie,outer:Yie,inner:Hie,zhanwei:qie,TextBox_textElement_Settled:Kie,TextBox_showName:Zie,TextBox_ShowName_Background:Qie,miniAvatarContainer:Jie,miniAvatarImg:eae,nameContainer:tae,outerName:rae,innerName:nae,text:iae};function NF(t){const{textArray:e,textDelay:r,currentConcatDialogPrev:n,currentDialogKey:i,isText:a,isSafari:o,isFirefox:s,fontSize:u,miniAvatar:l,isHasName:c,showName:f,font:h,textDuration:d,isUseStroke:p,textboxOpacity:v,textSizeState:g}=t,m=pS("Stage/TextBox/textbox.scss");ne.useEffect(()=>{function b(){[...document.querySelectorAll(".Textelement_start")].forEach(E=>{E.className=m("TextBox_textElement_Settled",yt.TextBox_textElement_Settled)})}return L.events.textSettle.on(b),()=>{L.events.textSettle.off(b)}},[]);let y=0;const _=f.map((b,S)=>{const w=b.map((E,T)=>{const A=E.reactNode;let O="",P="",k=!1;if(E.enhancedValue){k=!0;const j=E.enhancedValue;for(const z of j){const{key:J,value:Z}=z;switch(J){case"style":O=Z;break;case"tips":break;case"style-alltext":P=Z;break}}}const M=" "+ac(O,{label:"showname"}),B=" "+ac(P,{label:"showname"});return k?C.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:yt.zhanwei+B,children:[A,C.jsx("span",{className:m("outerName",yt.outerName)+M+B,children:A}),p&&C.jsx("span",{className:m("innerName",yt.innerName)+B,children:A})]})},T):C.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:yt.zhanwei+B,children:[A,C.jsx("span",{className:m("outerName",yt.outerName)+M+B,children:A}),p&&C.jsx("span",{className:m("innerName",yt.innerName)+B,children:A})]})},T)});return C.jsx("div",{style:{wordBreak:o||t.isFirefox?"break-all":void 0,display:o?"flex":void 0,flexWrap:o?"wrap":void 0},children:w},`text-line-${S}`)}),x=e.map((b,S)=>{const w=b.map((E,T)=>{const A=E.reactNode;let O="",P="";if(E.enhancedValue){const z=E.enhancedValue;for(const J of z){const{key:Z,value:$}=J;switch(Z){case"style":O=$;break;case"tips":break;case"style-alltext":P=$;break}}}let k=y*r;y++;let M=n.length;n!==""&&y>=M&&(k=k-M*r);const B=" "+ac(O),j=" "+ac(P);return y{const[t,e]=ne.useState(!0);ne.useEffect(()=>{const _=()=>{const x=cp.height,b=cp.width,S=window.innerHeight,w=window.innerWidth,E=S/x,T=w/b,A=w/x,O=S/b;[E,T,A,O].forEach(P=>{P<=.2?e(!1):e(!0)})};return window.addEventListener("resize",_),_(),()=>{window.removeEventListener("resize",_)}},[]);const r=Ne(_=>_.stage),n=Ne(_=>_.userData),i=gS(n.optionData.textSpeed),a=MF(n.optionData.textSpeed);let o=c_(n.optionData.textSize)+"%";const s=FF(),u=r.showText!==""||r.showName!=="";let l=n.optionData.textSize;u&&r.showTextSize!==-1&&(o=c_(r.showTextSize)+"%",l=r.showTextSize);const c=zf(l).with(ti.small,()=>3).with(ti.medium,()=>2).with(ti.large,()=>2).default(()=>2),f=gs(r.showText,c),h=r.showName!=="",d=gs(r.showName,c),p=r.currentConcatDialogPrev,v=r.currentDialogKey,g=r.miniAvatar,m=n.optionData.textboxOpacity,y=NF;return C.jsx(y,{textArray:f,isText:u,textDelay:i,showName:d,isHasName:h,currentConcatDialogPrev:p,fontSize:o,currentDialogKey:v,isSafari:oae,isFirefox:aae,miniAvatar:g,textDuration:a,font:s,textSizeState:l,lineLimit:c,isUseStroke:t,textboxOpacity:m})};function OP(t){return!!t.match(/[\u4e00-\u9fa5]|[\u0800-\u4e00]|[\uac00-\ud7ff]/)}function gs(t,e,r){return t.split(new RegExp("(?cS(o)).map(o=>uae(o)).map(o=>{const s=[];return o.forEach((u,l)=>{zf(u.type).with("SegmentType.String",()=>{const c=lae(u.value);s.push(...c.map(f=>({reactNode:f})))}).endsWith("SegmentType.Link",()=>{const c=u.value,f=C.jsx("span",{className:"__enhanced_text",children:C.jsxs("ruby",{children:[c.text,C.jsx("rt",{children:c.ruby})]},l+c.text)},c.text+`${l}`);s.push({reactNode:f,enhancedValue:c.values})})}),s}).slice(0,r?void 0:e)}function lae(t){if(!t)return[""];const e=[];let r="",n=OP(t[0]);const i=a=>/[!-\/:-@\[-`{-~\u2000-\u206F\u3000-\u303F\uff00-\uffef]/g.test(a);for(const a of t)if(a===" ")r&&(e.push(r),r=""),e.push(" "),n=!1;else if(OP(a)&&!i(a))!n&&r&&(e.push(r),r=""),e.push(a),n=!0;else{if(i(a)){r?(r+=a,e.push(r),r=""):e.length>0?e[e.length-1]+=a:e.push(a);continue}n&&r&&(e.push(r),r=""),r+=a,n=!1}return r&&e.push(r),e}function uae(t){const e=/(\[(.*?)\]\((.*?)\))|([^\[\]]+)/g,r=[];let n;for(;(n=e.exec(t))!==null;)if(n[1]){const i=n[2],a=n[3];let o=[],s="";if(a.match(/style=|tips=|ruby=|style-alltext=/)){o=cae(a);const u=o.find(l=>l.key==="ruby");u&&(s=u.value)}else s=a;r.push({type:"SegmentType.Link",value:{text:i,ruby:s,values:o}})}else{const i=n[0];r.push({type:"SegmentType.String",value:i})}return r.unshift({type:"SegmentType.String",value:""}),r}function cae(t){const e=[],r=/(\S+)=(.*?)(?=\s+\S+=|\s*$)/g;let n;for(;(n=r.exec(t))!==null;)e.push({key:n[1],value:n[2].replace(/~/g,":").trim()});return e}const fae=t=>{const e=te.getState().stage,r=te.getState().userData,n=te.dispatch;let i=Math.random().toString(),a=t.content;a&&(a=String(a).replace(/ /g," "));const o=He(t,"concat"),s=He(t,"notend"),u=He(t,"speaker"),l=He(t,"clear"),c=He(t,"vocal");o?(i=e.currentDialogKey,a=e.showText+a,n(Ge({key:"currentConcatDialogPrev",value:e.showText}))):n(Ge({key:"currentConcatDialogPrev",value:""})),n(Ge({key:"showText",value:a})),n(Ge({key:"vocal",value:""})),r.optionData.voiceInterruption===zc.no&&c===null||(n(Ge({key:"playVocal",value:""})),L.gameplay.performController.unmountPerform("vocal-play",!0)),n(Ge({key:"currentDialogKey",value:i}));const f=gS(r.optionData.textSpeed),d=gs(t.content,3).reduce((E,T)=>E+T.length,0),p=f*d;for(const E of t.args)if(E.key==="fontSize")switch(E.value){case"default":n(Ge({key:"showTextSize",value:-1}));break;case"small":n(Ge({key:"showTextSize",value:ti.small}));break;case"medium":n(Ge({key:"showTextSize",value:ti.medium}));break;case"large":n(Ge({key:"showTextSize",value:ti.large}));break}let v=e.showName;u!==null&&(v=u),l&&(v=""),n(Ge({key:"showName",value:v}));let g=null,m=0,y="",_="";for(const E of t.args)E.value===!0&&zf(E.key).with("left",()=>{y="left"}).with("right",()=>{y="right"}).endsWith("center",()=>{y="center"}),E.key==="figureId"&&(_=`${E.value.toString()}`);let x=80;const b=(E=!1)=>{let T=x+(Math.random()*60-30);Math.abs(T-x)<5&&(T=x+Math.sign(T-x)*5),x=Math.max(15,Math.min(T,100));const P=te.getState().stage.figureAssociatedAnimation.find(M=>M.targetId===_),k=_||`fig-${y}`;E&&(x=0),u_({audioLevel:x,OPEN_THRESHOLD:50,HALF_OPEN_THRESHOLD:25,currentMouthValue:0,lerpSpeed:1,key:k,animationItem:P,pos:y}),E||(g=setTimeout(b,50))};c?Bie(t):(_||y)&&(m=d*250,b());const S=TS();let w=750-r.optionData.textSpeed*250;return s&&(w=0),{performName:S,duration:p+w+m,isHoldOn:!1,stopFunction:()=>{L.events.textSettle.emit(),g&&(b(!0),clearTimeout(g))},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0,goNextWhenOver:s}};var yS={},Qc={document:{}},DF=Object.prototype.hasOwnProperty,BF=function(t){return qv(t)?t.toLowerCase():t},Ec=Array.isArray,hae=function(t){return qv(t)?t.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)|32)}):t};"I".toLowerCase()!=="i"&&(BF=hae);var dae,_S=Object.prototype.toString,jF=Object.getPrototypeOf,qg=XF("ng");Qc.angular||(Qc.angular={});Qc.document.documentMode;function pae(t){if(t==null||SS(t))return!1;if(Ec(t)||qv(t)||dae)return!0;var e="length"in Object(t)&&t.length;return bS(e)&&(e>=0&&(e-1 in t||t instanceof Array)||typeof t.item=="function")}function Dt(t,e,r){var n,i;if(t)if(VF(t))for(n in t)n!=="prototype"&&n!=="length"&&n!=="name"&&t.hasOwnProperty(n)&&e.call(r,t[n],n,t);else if(Ec(t)||pae(t)){var a=typeof t!="object";for(n=0,i=t.length;n"u"}function sl(t){return typeof t<"u"}function UF(t){return t!==null&&typeof t=="object"}function $F(t){return t!==null&&typeof t=="object"&&!jF(t)}function qv(t){return typeof t=="string"}function bS(t){return typeof t=="number"}function VF(t){return typeof t=="function"}function SS(t){return t&&t.window===t}function GF(t){return t&&t.$evalAsync&&t.$watch}var gae=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;function yae(t){return t&&bS(t.length)&&gae.test(_S.call(t))}function _ae(t){return _S.call(t)==="[object ArrayBuffer]"}function xae(t,e){var r=[],n=[];if(e){if(yae(e)||_ae(e))throw qg("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t===e)throw qg("cpi","Can't copy! Source and destination are identical.");return Ec(e)?e.length=0:Dt(e,function(s,u){u!=="$$hashKey"&&delete e[u]}),r.push(t),n.push(e),i(t,e)}return a(t);function i(s,u){var l=u.$$hashKey,c;if(Ec(s))for(var f=0,h=s.length;f=0)return"...";e.push(n)}return n})}function RP(t){return typeof t=="function"?t.toString().replace(/ \{[\s\S]*$/,""):mae(t)?"undefined":typeof t!="string"?Eae(t):t}function XF(t,e){return e=e||Error,function(){var r=2,n=arguments,i=n[0],a="["+(t?t+":":"")+i+"] ",o=n[1],s,u;for(a+=o.replace(/\{\d+\}/g,function(l){var c=+l.slice(1,-1),f=c+r;return f <= >= && || ! = |".split(" "),function(t){gd[t]=!0});var Tae={n:` `,f:"\f",r:"\r",t:" ",v:"\v","'":"'",'"':'"'},f_=function(e){this.options=e};f_.prototype={constructor:f_,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index=55296&&r<=56319&&n>=56320&&n<=57343?t+e:t},isExpOperator:function(t){return t==="-"||t==="+"||this.isNumber(t)},throwError:function(t,e,r){r=r||this.index;var n=sl(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,r)+"]":" "+r;throw ll("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,n,this.text)},readNumber:function(){for(var t="",e=this.index;this.index0&&!this.peek("}",")",";","]")&&t.push(this.expressionStatement()),!this.expect(";"))return{type:le.Program,body:t}},expressionStatement:function(){return{type:le.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var t=this.expression();this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var t=this.ternary();if(this.expect("=")){if(!HF(t))throw ll("lval","Trying to assign a value to a non l-value");t={type:le.AssignmentExpression,left:t,right:this.assignment(),operator:"="}}return t},ternary:function(){var t=this.logicalOR(),e,r;return this.expect("?")&&(e=this.expression(),this.consume(":"))?(r=this.expression(),{type:le.ConditionalExpression,test:t,alternate:e,consequent:r}):t},logicalOR:function(){for(var t=this.logicalAND();this.expect("||");)t={type:le.LogicalExpression,operator:"||",left:t,right:this.logicalAND()};return t},logicalAND:function(){for(var t=this.equality();this.expect("&&");)t={type:le.LogicalExpression,operator:"&&",left:t,right:this.equality()};return t},equality:function(){for(var t=this.relational(),e;e=this.expect("==","!=","===","!==");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var t=this.additive(),e;e=this.expect("<",">","<=",">=");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var t=this.multiplicative(),e;e=this.expect("+","-");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var t=this.unary(),e;e=this.expect("*","/","%");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var t;return(t=this.expect("+","-","!"))?{type:le.UnaryExpression,operator:t.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?t=xae(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?t={type:le.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e;e=this.expect("(","[",".");)e.text==="("?(t={type:le.CallExpression,callee:t,arguments:this.parseArguments()},this.consume(")")):e.text==="["?(t={type:le.MemberExpression,object:t,property:this.expression(),computed:!0},this.consume("]")):e.text==="."?t={type:le.MemberExpression,object:t,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return t},filter:function(t){for(var e=[t],r={type:le.CallExpression,callee:this.identifier(),arguments:e,filter:!0};this.expect(":");)e.push(this.expression());return r},parseArguments:function(){var t=[];if(this.peekToken().text!==")")do t.push(this.filterChain());while(this.expect(","));return t},identifier:function(){var t=this.consume();return t.identifier||this.throwError("is not a valid identifier",t),{type:le.Identifier,name:t.text}},constant:function(){return{type:le.Literal,value:this.consume().value}},arrayDeclaration:function(){var t=[];if(this.peekToken().text!=="]")do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:le.ArrayExpression,elements:t}},object:function(){var t=[],e;if(this.peekToken().text!=="}")do{if(this.peek("}"))break;e={type:le.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:le.ObjectExpression,properties:t}},throwError:function(t,e){throw ll("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},consume:function(t){if(this.tokens.length===0)throw ll("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},peekToken:function(){if(this.tokens.length===0)throw ll("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,r,n){return this.peekAhead(0,t,e,r,n)},peekAhead:function(t,e,r,n,i){if(this.tokens.length>t){var a=this.tokens[t],o=a.text;if(o===e||o===r||o===n||o===i||!e&&!r&&!n&&!i)return a}return!1},expect:function(t,e,r,n){var i=this.peek(t,e,r,n);return i?(this.tokens.shift(),i):!1},selfReferential:{this:{type:le.ThisExpression},$locals:{type:le.LocalsExpression}}};function Aae(t,e){return typeof t<"u"?t:e}function WF(t,e){return typeof t>"u"?e:typeof e>"u"?t:t+e}function Cae(t,e){var r=t(e);if(!r)throw new Error("Filter '"+e+"' is not defined");return!r.$stateful}function Er(t,e){var r,n,i;switch(t.type){case le.Program:r=!0,Dt(t.body,function(a){Er(a.expression,e),r=r&&a.expression.constant}),t.constant=r;break;case le.Literal:t.constant=!0,t.toWatch=[];break;case le.UnaryExpression:Er(t.argument,e),t.constant=t.argument.constant,t.toWatch=t.argument.toWatch;break;case le.BinaryExpression:Er(t.left,e),Er(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.left.toWatch.concat(t.right.toWatch);break;case le.LogicalExpression:Er(t.left,e),Er(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.constant?[]:[t];break;case le.ConditionalExpression:Er(t.test,e),Er(t.alternate,e),Er(t.consequent,e),t.constant=t.test.constant&&t.alternate.constant&&t.consequent.constant,t.toWatch=t.constant?[]:[t];break;case le.Identifier:t.constant=!1,t.toWatch=[t];break;case le.MemberExpression:Er(t.object,e),t.computed&&Er(t.property,e),t.constant=t.object.constant&&(!t.computed||t.property.constant),t.toWatch=[t];break;case le.CallExpression:i=t.filter?Cae(e,t.callee.name):!1,r=i,n=[],Dt(t.arguments,function(a){Er(a,e),r=r&&a.constant,a.constant||n.push.apply(n,a.toWatch)}),t.constant=r,t.toWatch=i?n:[t];break;case le.AssignmentExpression:Er(t.left,e),Er(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=[t];break;case le.ArrayExpression:r=!0,n=[],Dt(t.elements,function(a){Er(a,e),r=r&&a.constant,a.constant||n.push.apply(n,a.toWatch)}),t.constant=r,t.toWatch=n;break;case le.ObjectExpression:r=!0,n=[],Dt(t.properties,function(a){Er(a.value,e),r=r&&a.value.constant&&!a.computed,a.value.constant||n.push.apply(n,a.value.toWatch)}),t.constant=r,t.toWatch=n;break;case le.ThisExpression:t.constant=!1,t.toWatch=[];break;case le.LocalsExpression:t.constant=!1,t.toWatch=[];break}}function YF(t){if(t.length===1){var e=t[0].expression,r=e.toWatch;return r.length!==1||r[0]!==e?r:void 0}}function HF(t){return t.type===le.Identifier||t.type===le.MemberExpression}function qF(t){if(t.body.length===1&&HF(t.body[0].expression))return{type:le.AssignmentExpression,left:t.body[0].expression,right:{type:le.NGValueParameter},operator:"="}}function KF(t){return t.body.length===0||t.body.length===1&&(t.body[0].expression.type===le.Literal||t.body[0].expression.type===le.ArrayExpression||t.body[0].expression.type===le.ObjectExpression)}function ZF(t){return t.constant}function QF(t,e){this.astBuilder=t,this.$filter=e}QF.prototype={compile:function(t){var e=this,r=this.astBuilder.ast(t);this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},Er(r,e.$filter);var n="",i;if(this.stage="assign",i=qF(r)){this.state.computing="assign";var a=this.nextId();this.recurse(i,a),this.return_(a),n="fn.assign="+this.generateFunction("assign","s,v,l")}var o=YF(r.body);e.stage="inputs",Dt(o,function(l,c){var f="fn"+c;e.state[f]={vars:[],body:[],own:{}},e.state.computing=f;var h=e.nextId();e.recurse(l,h),e.return_(h),e.state.inputs.push(f),l.watchId=c}),this.state.computing="fn",this.stage="main",this.recurse(r);var s='"'+this.USE+" "+this.STRICT+`"; -`+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+n+this.watchFns()+"return fn;",u=new Function("$filter","getStringValue","ifDefined","plus",s)(this.$filter,zF,Aae,WF);return this.state=this.stage=void 0,u.ast=r,u.literal=KF(r),u.constant=ZF(r),u},USE:"use",STRICT:"strict",watchFns:function(){var t=[],e=this.state.inputs,r=this;return Dt(e,function(n){t.push("var "+n+"="+r.generateFunction(n,"s"))}),e.length&&t.push("fn.inputs=["+e.join(",")+"];"),t.join("")},generateFunction:function(t,e){return"function("+e+"){"+this.varsPrefix(t)+this.body(t)+"};"},filterPrefix:function(){var t=[],e=this;return Dt(this.state.filters,function(r,n){t.push(r+"=$filter("+e.escape(n)+")")}),t.length?"var "+t.join(",")+";":""},varsPrefix:function(t){return this.state[t].vars.length?"var "+this.state[t].vars.join(",")+";":""},body:function(t){return this.state[t].body.join("")},recurse:function(t,e,r,n,i,a){var o,s,u=this,l,c,f;if(n=n||xS,!a&&sl(t.watchId)){e=e||this.nextId(),this.if_("i",this.lazyAssign(e,this.unsafeComputedMember("i",t.watchId)),this.lazyRecurse(t,e,r,n,i,!0));return}switch(t.type){case le.Program:Dt(t.body,function(d,p){u.recurse(d.expression,void 0,void 0,function(v){s=v}),p!==t.body.length-1?u.current().body.push(s,";"):u.return_(s)});break;case le.Literal:c=this.escape(t.value),this.assign(e,c),n(e||c);break;case le.UnaryExpression:this.recurse(t.argument,void 0,void 0,function(d){s=d}),c=t.operator+"("+this.ifDefined(s,0)+")",this.assign(e,c),n(c);break;case le.BinaryExpression:this.recurse(t.left,void 0,void 0,function(d){o=d}),this.recurse(t.right,void 0,void 0,function(d){s=d}),t.operator==="+"?c=this.plus(o,s):t.operator==="-"?c=this.ifDefined(o,0)+t.operator+this.ifDefined(s,0):c="("+o+")"+t.operator+"("+s+")",this.assign(e,c),n(c);break;case le.LogicalExpression:e=e||this.nextId(),u.recurse(t.left,e),u.if_(t.operator==="&&"?e:u.not(e),u.lazyRecurse(t.right,e)),n(e);break;case le.ConditionalExpression:e=e||this.nextId(),u.recurse(t.test,e),u.if_(e,u.lazyRecurse(t.alternate,e),u.lazyRecurse(t.consequent,e)),n(e);break;case le.Identifier:e=e||this.nextId();var h=u.current().inAssignment;r&&(h?r.context=this.assign(this.nextId(),"s"):r.context=u.stage==="inputs"?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",t.name)+"?l:s"),r.computed=!1,r.name=t.name),u.if_(u.stage==="inputs"||u.not(u.getHasOwnProperty("l",t.name)),function(){u.if_(u.stage==="inputs"||u.and_("s",u.or_(u.isNull(u.nonComputedMember("s",t.name)),u.hasOwnProperty_("s",t.name))),function(){i&&i!==1&&u.if_(u.isNull(u.nonComputedMember("s",t.name)),u.lazyAssign(u.nonComputedMember("s",t.name),"{}")),u.assign(e,u.nonComputedMember("s",t.name))})},e&&u.lazyAssign(e,u.nonComputedMember("l",t.name))),n(e);break;case le.MemberExpression:o=r&&(r.context=this.nextId())||this.nextId(),e=e||this.nextId(),u.recurse(t.object,o,void 0,function(){var d=null,p=u.current().inAssignment;t.computed?(s=u.nextId(),p||u.state.computing==="assign"?d=u.unsafeComputedMember(o,s):d=u.computedMember(o,s)):(p||u.state.computing==="assign"?d=u.unsafeNonComputedMember(o,t.property.name):d=u.nonComputedMember(o,t.property.name),s=t.property.name),t.computed&&t.property.type===le.Literal&&u.recurse(t.property,s),u.if_(u.and_(u.notNull(o),u.or_(u.isNull(d),u.hasOwnProperty_(o,s,t.computed))),function(){t.computed?(t.property.type!==le.Literal&&u.recurse(t.property,s),i&&i!==1&&u.if_(u.not(d),u.lazyAssign(d,"{}")),u.assign(e,d),r&&(r.computed=!0,r.name=s)):(i&&i!==1&&u.if_(u.isNull(d),u.lazyAssign(d,"{}")),u.assign(e,d),r&&(r.computed=!1,r.name=t.property.name))},function(){u.assign(e,"undefined")}),n(e)},!!i);break;case le.CallExpression:e=e||this.nextId(),t.filter?(s=u.filter(t.callee.name),l=[],Dt(t.arguments,function(d){var p=u.nextId();u.recurse(d,p),l.push(p)}),c=s+".call("+s+","+l.join(",")+")",u.assign(e,c),n(e)):(s=u.nextId(),o={},l=[],u.recurse(t.callee,s,o,function(){u.if_(u.notNull(s),function(){if(Dt(t.arguments,function(p){u.recurse(p,t.constant?void 0:u.nextId(),void 0,function(v){l.push(v)})}),o.name){var d=u.member(o.context,o.name,o.computed);c="("+d+" === null ? null : "+u.unsafeMember(o.context,o.name,o.computed)+".call("+[o.context].concat(l).join(",")+"))"}else c=s+"("+l.join(",")+")";u.assign(e,c)},function(){u.assign(e,"undefined")}),n(e)}));break;case le.AssignmentExpression:s=this.nextId(),o={},u.current().inAssignment=!0,this.recurse(t.left,void 0,o,function(){u.if_(u.and_(u.notNull(o.context),u.or_(u.hasOwnProperty_(o.context,o.name),u.isNull(u.member(o.context,o.name,o.computed)))),function(){u.recurse(t.right,s),c=u.member(o.context,o.name,o.computed)+t.operator+s,u.assign(e,c),n(e||c)}),u.current().inAssignment=!1,u.recurse(t.right,s),u.current().inAssignment=!0},1),u.current().inAssignment=!1;break;case le.ArrayExpression:l=[],Dt(t.elements,function(d){u.recurse(d,t.constant?void 0:u.nextId(),void 0,function(p){l.push(p)})}),c="["+l.join(",")+"]",this.assign(e,c),n(e||c);break;case le.ObjectExpression:l=[],f=!1,Dt(t.properties,function(d){d.computed&&(f=!0)}),f?(e=e||this.nextId(),this.assign(e,"{}"),Dt(t.properties,function(d){d.computed?(o=u.nextId(),u.recurse(d.key,o)):o=d.key.type===le.Identifier?d.key.name:""+d.key.value,s=u.nextId(),u.recurse(d.value,s),u.assign(u.unsafeMember(e,o,d.computed),s)})):(Dt(t.properties,function(d){u.recurse(d.value,t.constant?void 0:u.nextId(),void 0,function(p){l.push(u.escape(d.key.type===le.Identifier?d.key.name:""+d.key.value)+":"+p)})}),c="{"+l.join(",")+"}",this.assign(e,c)),n(e||c);break;case le.ThisExpression:this.assign(e,"s"),n(e||"s");break;case le.LocalsExpression:this.assign(e,"l"),n(e||"l");break;case le.NGValueParameter:this.assign(e,"v"),n(e||"v");break}},getHasOwnProperty:function(t,e){var r=t+"."+e,n=this.current().own;return n.hasOwnProperty(r)||(n[r]=this.nextId(!1,t+"&&("+this.escape(e)+" in "+t+")")),n[r]},assign:function(t,e){if(t)return this.current().body.push(t,"=",e,";"),t},filter:function(t){return this.state.filters.hasOwnProperty(t)||(this.state.filters[t]=this.nextId(!0)),this.state.filters[t]},ifDefined:function(t,e){return"ifDefined("+t+","+this.escape(e)+")"},plus:function(t,e){return"plus("+t+","+e+")"},return_:function(t){this.current().body.push("return ",t,";")},if_:function(t,e,r){if(t===!0)e();else{var n=this.current().body;n.push("if(",t,"){"),e(),n.push("}"),r&&(n.push("else{"),r(),n.push("}"))}},or_:function(t,e){return"("+t+") || ("+e+")"},hasOwnProperty_:function(t,e,r){return r?"(Object.prototype.hasOwnProperty.call("+t+","+e+"))":"(Object.prototype.hasOwnProperty.call("+t+",'"+e+"'))"},and_:function(t,e){return"("+t+") && ("+e+")"},not:function(t){return"!("+t+")"},isNull:function(t){return t+"==null"},notNull:function(t){return t+"!=null"},nonComputedMember:function(t,e){var r=/^[$_a-zA-Z][$_a-zA-Z0-9]*$/,n=/[^$_a-zA-Z0-9]/g,i="";return r.test(e)?i=t+"."+e:(e=e.replace(n,this.stringEscapeFn),i=t+'["'+e+'"]'),i},unsafeComputedMember:function(t,e){return t+"["+e+"]"},unsafeNonComputedMember:function(t,e){return this.nonComputedMember(t,e)},computedMember:function(t,e){return this.state.computing==="assign"?this.unsafeComputedMember(t,e):"("+t+".hasOwnProperty("+e+") ? "+t+"["+e+"] : null)"},unsafeMember:function(t,e,r){return r?this.unsafeComputedMember(t,e):this.unsafeNonComputedMember(t,e)},member:function(t,e,r){return r?this.computedMember(t,e):this.nonComputedMember(t,e)},getStringValue:function(t){this.assign(t,"getStringValue("+t+")")},lazyRecurse:function(t,e,r,n,i,a){var o=this;return function(){o.recurse(t,e,r,n,i,a)}},lazyAssign:function(t,e){var r=this;return function(){r.assign(t,e)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)},escape:function(t){if(qv(t))return"'"+t.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(bS(t))return t.toString();if(t===!0)return"true";if(t===!1)return"false";if(t===null)return"null";if(typeof t>"u")return"undefined";throw ll("esc","IMPOSSIBLE")},nextId:function(t,e){var r="v"+this.state.nextId++;return t||this.current().vars.push(r+(e?"="+e:"")),r},current:function(){return this.state[this.state.computing]}};function JF(t,e){this.astBuilder=t,this.$filter=e}JF.prototype={compile:function(t){var e=this,r=this.astBuilder.ast(t);Er(r,e.$filter);var n,i;(n=qF(r))&&(i=this.recurse(n));var a=YF(r.body),o;a&&(o=[],Dt(a,function(l,c){var f=e.recurse(l);l.input=f,o.push(f),l.watchId=c}));var s=[];Dt(r.body,function(l){s.push(e.recurse(l.expression))});var u=r.body.length===0?xS:r.body.length===1?s[0]:function(l,c){var f;return Dt(s,function(h){f=h(l,c)}),f};return i&&(u.assign=function(l,c,f){return i(l,f,c)}),o&&(u.inputs=o),u.ast=r,u.literal=KF(r),u.constant=ZF(r),u},recurse:function(t,e,r){var n,i,a=this,o;if(t.input)return this.inputs(t.input,t.watchId);switch(t.type){case le.Literal:return this.value(t.value,e);case le.UnaryExpression:return i=this.recurse(t.argument),this["unary"+t.operator](i,e);case le.BinaryExpression:return n=this.recurse(t.left),i=this.recurse(t.right),this["binary"+t.operator](n,i,e);case le.LogicalExpression:return n=this.recurse(t.left),i=this.recurse(t.right),this["binary"+t.operator](n,i,e);case le.ConditionalExpression:return this["ternary?:"](this.recurse(t.test),this.recurse(t.alternate),this.recurse(t.consequent),e);case le.Identifier:return a.identifier(t.name,e,r);case le.MemberExpression:return n=this.recurse(t.object,!1,!!r),t.computed||(i=t.property.name),t.computed&&(i=this.recurse(t.property)),t.computed?this.computedMember(n,i,e,r):this.nonComputedMember(n,i,e,r);case le.CallExpression:return o=[],Dt(t.arguments,function(s){o.push(a.recurse(s))}),t.filter&&(i=this.$filter(t.callee.name)),t.filter||(i=this.recurse(t.callee,!0)),t.filter?function(s,u,l,c){for(var f=[],h=0;h":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)>e(n,i,a,o);return r?{value:s}:s}},"binary<=":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)<=e(n,i,a,o);return r?{value:s}:s}},"binary>=":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)>=e(n,i,a,o);return r?{value:s}:s}},"binary&&":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)&&e(n,i,a,o);return r?{value:s}:s}},"binary||":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)||e(n,i,a,o);return r?{value:s}:s}},"ternary?:":function(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s)?e(i,a,o,s):r(i,a,o,s);return n?{value:u}:u}},value:function(t,e){return function(){return e?{context:void 0,name:void 0,value:t}:t}},identifier:function(t,e,r){return function(n,i,a,o){var s=i&&t in i?i:n;r&&r!==1&&s&&s[t]==null&&(s[t]={});var u=s?s[t]:void 0;return e?{context:s,name:t,value:u}:u}},computedMember:function(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s),l,c;return u!=null&&(l=e(i,a,o,s),l=zF(l),n&&n!==1&&u&&!u[l]&&(u[l]={}),Object.prototype.hasOwnProperty.call(u,l)&&(c=u[l])),r?{context:u,name:l,value:c}:c}},nonComputedMember:function(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s);n&&n!==1&&u&&u[e]==null&&(u[e]={});var l=void 0;return u!=null&&Object.prototype.hasOwnProperty.call(u,e)&&(l=u[e]),r?{context:u,name:e,value:l}:l}},inputs:function(t,e){return function(r,n,i,a){return a?a[e]:t(r,n,i)}}};var h_=function(e,r,n){this.lexer=e,this.$filter=r,this.options=n,this.ast=new le(e,n),this.astCompiler=n.csp?new JF(this.ast,r):new QF(this.ast,r)};h_.prototype={constructor:h_,parse:function(t){return this.astCompiler.compile(t)}};yS.Lexer=f_;yS.Parser=h_;var eN=yS,Pae={},Oae=eN.Lexer,Rae=eN.Parser;function wS(t,e){e=e||{};var r=e.filters||Pae,n=e.filters?e.cache||{}:wS.cache,i=e,a;if(typeof t!="string")throw new TypeError("src must be a string, instead saw '"+typeof t+"'");var o={csp:e.csp!=null?e.csp:!1,literals:e.literals!=null?e.literals:{true:!0,false:!1,null:null,undefined:void 0}},s=new Oae(i),u=new Rae(s,function(c){return r[c]},o);return n?(a=n[t],a||(a=n[t]=u.parse(t)),a):u.parse(t)}wS.cache=Object.create(null);var tN=wS;const Iae=t=>{let e=!1;t.args.forEach(n=>{n.key==="global"&&(e=!0)});let r;if(e?r=lW:r=Pk,t.content.match(/\s*=\s*/)){const n=t.content.split(/\s*=\s*/)[0],i=t.content.split(/\s*=\s*/)[1];if(i==="random()")te.dispatch(r({key:n,value:Math.random()}));else if(i.match(/[+\-*\/()]/)){const o=i.split(/([+\-*\/()])/g).map(u=>{if(!u.trim().match(/^[a-zA-Z_$][a-zA-Z0-9_.]*$/))return u;const l=fp(u.trim(),!0);return typeof l=="string"?`'${l}'`:l}).reduce((u,l)=>u+l,"");let s="";try{s=tN(o)()}catch(u){ge.error("expression compile error",u)}te.dispatch(r({key:n,value:s}))}else i.match(/true|false/)?(i.match(/true/)&&te.dispatch(r({key:n,value:!0})),i.match(/false/)&&te.dispatch(r({key:n,value:!1}))):i.length===0?te.dispatch(r({key:n,value:""})):isNaN(Number(i))?te.dispatch(r({key:n,value:fp(i,!0)})):te.dispatch(r({key:n,value:Number(i)}));e?(ge.debug("设置全局变量:",{key:n,value:te.getState().userData.globalGameVar[n]}),hp()):ge.debug("设置变量:",{key:n,value:te.getState().stage.GameVar[n]})}return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function kae(t){let e;const r=te.getState().stage,n=te.getState().userData,i={stage:r,userData:n};if(r.GameVar.hasOwnProperty(t))e=r.GameVar[t];else if(n.globalGameVar.hasOwnProperty(t))e=n.globalGameVar[t];else if(t.startsWith("$")){const a=t.replace("$","");e=Aee(i,a,void 0)}return e}function fp(t,e=!1){const r=kae(t);return r??(ge.warn("valueFromState result null, key = "+t),e?t:`{${t}}`)}const Mae=t=>{const e=te.getState().stage,r=te.getState().userData,n=te.dispatch,i={stageGameVar:e.GameVar,globalGameVar:r.globalGameVar};n(Ge({key:"showText",value:JSON.stringify(i)})),n(Ge({key:"showName",value:"展示变量"})),ge.debug("展示变量:",i),setTimeout(()=>{L.events.textSettle.emit()},0);const a=TS(),o=750-r.optionData.textSpeed*250;return{performName:a,duration:o,isHoldOn:!1,stopFunction:()=>{L.events.textSettle.emit()},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function it(t,e,r){return{scriptType:t,scriptFunction:e,...r}}const rN={};function Fae(t){const e={};for(const[r,n]of Object.entries(t))e[r]=rN[n.scriptType]={scriptString:r,...n};return e}const Nae=t=>{const{content:e}=t,r=e.split(",");for(const n of r){const i=n.split("->");if(i.length>=2){const a=i[0],o=i[1];te.dispatch(Tr.replaceUIlable([a,o]))}}return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},nN=Fae({intro:it(Qe.intro,iie),changeBg:it(Qe.changeBg,Xte),changeFigure:it(Qe.changeFigure,zte),miniAvatar:it(Qe.miniAvatar,oie,{next:!0}),changeScene:it(Qe.changeScene,Wte),choose:it(Qe.choose,Fne),end:it(Qe.end,Iie),bgm:it(Qe.bgm,o7,{next:!0}),playVideo:it(Qe.video,pie),setComplexAnimation:it(Qe.setComplexAnimation,yie),setFilter:it(Qe.setFilter,xie),pixiInit:it(Qe.pixiInit,Mie,{next:!0}),pixiPerform:it(Qe.pixi,hie,{next:!0}),label:it(Qe.label,aie,{next:!0}),jumpLabel:it(Qe.jumpLabel,kie),setVar:it(Qe.setVar,Iae,{next:!0}),showVars:it(Qe.showVars,Mae),unlockCg:it(Qe.unlockCg,Pie,{next:!0}),unlockBgm:it(Qe.unlockBgm,Cie,{next:!0}),say:it(Qe.say,fae),filmMode:it(Qe.filmMode,Dne,{next:!0}),callScene:it(Qe.callScene,MZ),setTextbox:it(Qe.setTextbox,Sie),setAnimation:it(Qe.setAnimation,vie),playEffect:it(Qe.playEffect,die,{next:!0}),setTempAnimation:it(Qe.setTempAnimation,bie),__commment:it(Qe.comment,Lne,{next:!0}),setTransform:it(Qe.setTransform,wie),setTransition:it(Qe.setTransition,Aie,{next:!0}),getUserInput:it(Qe.getUserInput,Xne),applyStyle:it(Qe.applyStyle,Nae,{next:!0})}),iN=Object.values(nN),Lae=iN.filter(t=>t.next).map(t=>t.scriptType),Kv=new a7(gW,Nn,Lae,iN),ca=(t,e,r)=>{const n=Kv.parse(t,e,r);return ge.info(`解析场景:${e},数据为:`,n),n},ES=t=>{var n;let e=mW;e=(((n=rN[t.command])==null?void 0:n.scriptFunction)??nN.say.scriptFunction)(t),e.arrangePerformPromise?e.arrangePerformPromise.then(i=>L.gameplay.performController.arrangeNewPerform(i,t)):L.gameplay.performController.arrangeNewPerform(e,t)},Dae=t=>{L.sceneManager.lockSceneWrite||(L.sceneManager.lockSceneWrite=!0,ua(t.sceneUrl).then(e=>{L.sceneManager.sceneData.currentScene=ca(e,t.sceneName,t.sceneUrl),L.sceneManager.sceneData.currentSentenceId=t.continueLine+1,ge.debug("现在恢复场景,恢复后场景:",L.sceneManager.sceneData.currentScene),L.sceneManager.lockSceneWrite=!1,tn()}).catch(e=>{ge.error("场景调用错误",e),L.sceneManager.lockSceneWrite=!1}))};function Bae(t){try{return tN(t)()}catch{return!1}}const d_=t=>{if(t===void 0)return!0;const r=t.split(/([+\-*\/()>=|<=|==|&&|\|\||!=)/g).map(n=>n.match(/[a-zA-Z]/)?n.match(/true/)||n.match(/false/)?n:fp(n,!0):n).reduce((n,i)=>n+i,"");return!!Bae(r)},aN=()=>{if(L.sceneManager.sceneData.currentSentenceId>L.sceneManager.sceneData.currentScene.sentenceList.length-1){if(L.sceneManager.sceneData.sceneStack.length!==0){const l=L.sceneManager.sceneData.sceneStack.pop();l!==void 0&&Dae(l)}return}const t=L.sceneManager.sceneData.currentScene.sentenceList[L.sceneManager.sceneData.currentSentenceId],e=l=>{let c=l;const f=c.match(new RegExp("(?{const d=fp(h.replace(new RegExp("(?{t.content=e(t.content),t.args.forEach(l=>{l.value&&typeof l.value=="string"&&(l.value=e(l.value))})})();let n=!0,i=!1,a="";if(t.args.forEach(l=>{l.key==="when"&&(i=!0,a=l.value.toString())}),i&&(n=d_(a)),!n){ge.warn("不满足条件,跳过本句!"),L.sceneManager.sceneData.currentSentenceId++,tn();return}ES(t);let o=!1;t.args.forEach(l=>{l.key==="next"&&l.value&&(o=!0)});let s=t.command===Qe.say;t.args.forEach(l=>{l.key==="notend"&&l.value===!0&&(s=!1)});let u;if(o){L.sceneManager.sceneData.currentSentenceId++,aN();return}setTimeout(()=>{u=te.getState().stage;const l={currentStageState:u,globalGameVar:te.getState().userData.globalGameVar};ge.debug("本条语句执行结果",l),s&&L.backlogManager.saveCurrentStateToBacklog()},0),L.sceneManager.sceneData.currentSentenceId++},tn=()=>{if(L.events.userInteractNext.emit(),te.getState().GUI.showTitle)return;let e=!1;if(L.gameplay.performController.performList.forEach(i=>{i.blockingNext()&&(e=!0)}),e){ge.warn("next 被阻塞!");return}let r=!0;if(L.gameplay.performController.performList.forEach(i=>{!i.isHoldOn&&!i.skipNextCollect&&(r=!1)}),r){const i=te.getState().stage,a=Jt(i);for(let o=0;oMath.random().toString().substring(0,10);class jae{constructor(){Ae(this,"performList",[]);Ae(this,"timeoutList",[])}arrangeNewPerform(e,r,n=!0){if(e.performName!=="none"){if(n){const i={id:e.performName,isHoldOn:e.isHoldOn,script:r};te.dispatch(Tr.addPerform(i))}e.stopTimeout=setTimeout(()=>{e.isHoldOn||this.unmountPerform(e.performName)},e.duration),r.args.find(i=>i.key==="continue"&&i.value===!0)&&(e.goNextWhenOver=!0),this.performList.push(e)}}unmountPerform(e,r=!1){if(r)for(let n=0;n{n.blockingAuto()&&(e=!0)}),e?setTimeout(this.goNextWhenOver,100):tn()}}class Uae{constructor(){Ae(this,"isAuto",!1);Ae(this,"isFast",!1);Ae(this,"autoInterval",null);Ae(this,"fastInterval",null);Ae(this,"autoTimeout",null);Ae(this,"pixiStage",null);Ae(this,"performController",new jae)}resetGamePlay(){this.performController.timeoutList=[],this.isAuto=!1,this.isFast=!1;const e=this.autoInterval;e!==null&&clearInterval(e),this.autoInterval=null;const r=this.fastInterval;r!==null&&clearInterval(r),this.fastInterval=null;const n=this.autoTimeout;n!==null&&clearInterval(n),this.autoTimeout=null}}function $ae(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(i){i(r)}),(n=t.get("*"))&&n.slice().map(function(i){i(e,r)})}}}class Vae{constructor(){Ae(this,"textSettle",_h("text-settle"));Ae(this,"userInteractNext",_h("__NEXT"));Ae(this,"fullscreenDbClick",_h("fullscreen-dbclick"));Ae(this,"styleUpdate",_h("style-update"))}}const Kg=$ae();function _h(t){return{on:(e,r)=>{Kg.on(`${t}-${r??""}`,e)},emit:(e,r)=>{Kg.emit(`${t}-${r??""}`,e)},off:(e,r)=>{Kg.off(`${t}-${r??""}`,e)}}}class Gae{constructor(){Ae(this,"sceneManager",new pW);Ae(this,"backlogManager",new dW(this.sceneManager));Ae(this,"animationManager",new vW);Ae(this,"gameplay",new Uae);Ae(this,"gameName","");Ae(this,"gameKey","");Ae(this,"events",new Vae)}}const L=new Gae,st=oN(()=>{const t=te.getState().userData;ms.setItem(L.gameKey,t).then(()=>{ge.info("写入本地存储")})},100),Jc=oN(()=>{ms.getItem(L.gameKey).then(t=>{if(!t||!sN(t)){ge.warn("现在重置数据"),st();return}te.dispatch(Bb(t))})},100);function oN(t,e){let r;function n(...i){clearTimeout(r);let a;return r=setTimeout(()=>{a=t.apply(n,i)},e),a}return n}const hp=()=>{const t=te.getState().userData;ms.setItem(L.gameKey,t).then(()=>{ms.getItem(L.gameKey).then(e=>{if(!e){st();return}te.dispatch(Bb(e))}),ge.info("同步本地存储")})};function sN(t){let e=!0;for(const r in K0)t.hasOwnProperty(r)||(e=!1);return e}async function lN(){const t=await ms.getItem(L.gameKey);if(!t||!sN(t)){const e=te.getState().userData;return ge.warn("现在重置数据"),await ms.setItem(L.gameKey,e)}else te.dispatch(Bb(t))}var vt=(t=>(t[t.Save=0]="Save",t[t.Load=1]="Load",t[t.Option=2]="Option",t))(vt||{});const Xae={showBacklog:!1,showStarter:!0,showTitle:!0,showMenuPanel:!1,showTextBox:!0,showControls:!0,controlsVisibility:!0,currentMenuTag:vt.Option,titleBg:"",titleBgm:"",logoImage:[],showExtra:!1,showGlobalDialog:!1,showPanicOverlay:!1,isEnterGame:!1,isShowLogo:!0},uN=Qp({name:"gui",initialState:Xae,reducers:{setVisibility:(t,e)=>{Jc();const{component:r,visibility:n}=e.payload;t[r]=n},setMenuPanelTag:(t,e)=>{Jc(),t.currentMenuTag=e.payload},setGuiAsset:(t,e)=>{const{asset:r,value:n}=e.payload;t[r]=n},setLogoImage:(t,e)=>{t.logoImage=[...e.payload]}}}),{setVisibility:rt,setMenuPanelTag:ss,setGuiAsset:dp,setLogoImage:zae}=uN.actions,Wae=uN.reducer,te=TU({reducer:{stage:rz,GUI:Wae,userData:fW,saveData:Rie},middleware:tk({serializableCheck:!1})});let IP;function AS(t,e=0,r=100){if(ge.debug("playing bgm"+t),t===""){IP=setTimeout(()=>{te.dispatch(Ge({key:"bgm",value:{src:"",enter:0,volume:100}}))},e);const n=te.getState().stage.bgm.src;te.dispatch(Ge({key:"bgm",value:{src:n,enter:-e,volume:r}}))}else clearTimeout(IP),te.dispatch(Ge({key:"bgm",value:{src:t,enter:e,volume:r}}));setTimeout(()=>{const n=document.getElementById("currentBgm");n.src&&(n==null||n.play())},0)}function Wf(t){const e=document.getElementById("ebg");e&&(e.style.backgroundImage=`url("${t}")`)}const CS=()=>{ge.warn("清除所有演出");for(let t=0;t{te.getState().stage.PerformList.forEach(e=>{ES(e.script)})},cN=(t,e=!0)=>{const r=te.dispatch,n=L.backlogManager.getBacklog()[t];ge.debug("读取的backlog数据",n),e&&ua(n.saveScene.sceneUrl).then(a=>{L.sceneManager.sceneData.currentScene=ca(a,n.saveScene.sceneName,n.saveScene.sceneUrl);const o=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(L.sceneManager.sceneData.currentScene.sceneUrl);const s=jf(o);Uf(s)}),L.sceneManager.sceneData.currentSentenceId=n.saveScene.currentSentenceId,L.sceneManager.sceneData.sceneStack=Jt(n.saveScene.sceneStack),CS();for(let a=L.backlogManager.getBacklog().length-1;a>t;a--)L.backlogManager.getBacklog().pop();L.backlogManager.isSaveBacklogNext=!0;const i=Jt(n.currentStageState);r(ov(i)),setTimeout(PS,0),r(rt({component:"showBacklog",visibility:!1})),r(rt({component:"showTextBox",visibility:!0}))},fN=t=>{const r=te.getState().saveData.saveData[t];ge.debug("读取的存档数据",r),hN(r)};function hN(t){if(!t){ge.info("暂无存档");return}const e=t;ua(e.sceneData.sceneUrl).then(a=>{L.sceneManager.sceneData.currentScene=ca(a,e.sceneData.sceneName,e.sceneData.sceneUrl);const o=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(L.sceneManager.sceneData.currentScene.sceneUrl);const s=jf(o);Uf(s)}),L.sceneManager.sceneData.currentSentenceId=e.sceneData.currentSentenceId,L.sceneManager.sceneData.sceneStack=Jt(e.sceneData.sceneStack),CS();const r=e.backlog;L.backlogManager.getBacklog().splice(0,L.backlogManager.getBacklog().length);for(const a of r)L.backlogManager.getBacklog().push(a);const n=Jt(e.nowStageState),i=te.dispatch;i(ov(n)),setTimeout(PS,0),i(rt({component:"showTitle",visibility:!1})),i(rt({component:"showMenuPanel",visibility:!1})),Wf(te.getState().stage.bgName)}function yd(t,e){for(let r=t;r<=e;r++){const n=te.getState().saveData.saveData[r];Os.setItem(`${L.gameKey}-saves${r}`,n).then(()=>{ge.info(`存档${r}写入本地存储`)})}}function Zv(t,e){for(let r=t;r<=e;r++)Os.getItem(`${L.gameKey}-saves${r}`).then(n=>{te.dispatch(Oa.saveGame({index:r,saveData:n})),ge.info(`存档${r}读取自本地存储`)})}async function _d(){const t=te.getState().saveData.quickSaveData;await Os.setItem(`${L.gameKey}-saves-fast`,t),ge.info("快速存档写入本地存储")}async function OS(){const t=await Os.getItem(`${L.gameKey}-saves-fast`);te.dispatch(Oa.setFastSave(t)),ge.info("快速存档读取自本地存储")}const p_=t=>{const e=dN(t);te.dispatch(Oa.saveGame({index:t,saveData:e})),yd(t,t)};function dN(t,e=!0){const r=te.getState().stage,n=Jt(L.backlogManager.getBacklog());let i="";if(e){const o=document.getElementById("pixiCanvas"),s=document.createElement("canvas"),u=s.getContext("2d");s.width=480,s.height=270,u.drawImage(o,0,0,480,270),i=s.toDataURL("image/webp",.5),s.remove()}return{nowStageState:Jt(r),backlog:n,index:t,saveTime:new Date().toLocaleDateString()+" "+new Date().toLocaleTimeString("chinese",{hour12:!1}),sceneData:{currentSentenceId:L.sceneManager.sceneData.currentSentenceId,sceneStack:Jt(L.sceneManager.sceneData.sceneStack),sceneName:L.sceneManager.sceneData.currentScene.sceneName,sceneUrl:L.sceneManager.sceneData.currentScene.sceneUrl},previewImage:i}}function Yae(){`${L.gameName}${L.gameKey}`,`${L.gameName}${L.gameKey}`}async function Hae(){const t=dN(-1,!1),e=Jt(t);te.dispatch(Oa.setFastSave(e)),await _d()}async function qae(){return await lN(),te.getState().saveData.quickSaveData!==null}async function Kae(){await OS();const t=te.getState().saveData.quickSaveData;t&&hN(t)}const Zae=()=>{mS(!0);const t=Nn("start.txt",Fn.scene);ua(t).then(e=>{L.sceneManager.sceneData.currentScene=ca(e,"start.txt",t),tn()}),te.dispatch(rt({component:"showTitle",visibility:!1}))};async function Qae(){if(Wf(te.getState().stage.bgName),await qae()&&L.sceneManager.sceneData.currentSentenceId===0){await Kae();return}L.sceneManager.sceneData.currentSentenceId===0&&L.sceneManager.sceneData.currentScene.sceneName==="start.txt"?tn():PS()}function RS(t,e){if(t==null)return{};var r=Cre(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var Jae={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const eoe=gn(Jae);var toe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function kP(t){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},r=t.match(/<\/?([^\s]+?)[/\s>]/);if(r&&(e.name=r[1],(eoe[r[1]]||t.charAt(t.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var n=t.indexOf("-->");return{type:"comment",comment:n!==-1?t.slice(4,n):""}}for(var i=new RegExp(toe),a=null;(a=i.exec(t))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),e.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(e.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return e}var roe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,noe=/^\s*$/,ioe=Object.create(null);function pN(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(r){var n=[];for(var i in r)n.push(i+'="'+r[i]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(pN,"")+"";case"comment":return t+""}}var aoe={parse:function(t,e){e||(e={}),e.components||(e.components=ioe);var r,n=[],i=[],a=-1,o=!1;if(t.indexOf("<")!==0){var s=t.indexOf("<");n.push({type:"text",content:s===-1?t:t.substring(0,s)})}return t.replace(roe,function(u,l){if(o){if(u!=="")return;o=!1}var c,f=u.charAt(1)!=="/",h=u.startsWith("");return{type:"comment",comment:n!==-1?t.slice(4,n):""}}for(var i=new RegExp(toe),a=null;(a=i.exec(t))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),e.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(e.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return e}var roe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,noe=/^\s*$/,ioe=Object.create(null);function pN(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(r){var n=[];for(var i in r)n.push(i+'="'+r[i]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(pN,"")+"";case"comment":return t+""}}var aoe={parse:function(t,e){e||(e={}),e.components||(e.components=ioe);var r,n=[],i=[],a=-1,o=!1;if(t.indexOf("<")!==0){var s=t.indexOf("<");n.push({type:"text",content:s===-1?t:t.substring(0,s)})}return t.replace(roe,function(u,l){if(o){if(u!=="")return;o=!1}var c,f=u.charAt(1)!=="/",h=u.startsWith(" WebGAL - + From 8de04ff1df60c5ea2aa1f1f64d192e7ab410bb6d Mon Sep 17 00:00:00 2001 From: Mahiru Date: Mon, 4 Nov 2024 00:30:41 +0800 Subject: [PATCH 2/4] fix engine of effect duplicate problem --- packages/origine2/src/config/info.ts | 2 +- .../assets/{index-f831d08d.js => index-338efd63.js} | 6 +++--- .../{initRegister-2c254553.js => initRegister-8a9071ee.js} | 2 +- packages/terre2/assets/templates/WebGAL_Template/index.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename packages/terre2/assets/templates/WebGAL_Template/assets/{index-f831d08d.js => index-338efd63.js} (96%) rename packages/terre2/assets/templates/WebGAL_Template/assets/{initRegister-2c254553.js => initRegister-8a9071ee.js} (95%) diff --git a/packages/origine2/src/config/info.ts b/packages/origine2/src/config/info.ts index f0c8112d2..885803fbf 100644 --- a/packages/origine2/src/config/info.ts +++ b/packages/origine2/src/config/info.ts @@ -5,5 +5,5 @@ export interface Info { export const __INFO: Info = { version: '4.5.8', - buildTime: '2024-08-17T14:10:41.796Z', // 编译时会通过 version-sync.js 自动更新 + buildTime: '2024-11-03T16:28:55.197Z', // 编译时会通过 version-sync.js 自动更新 }; diff --git a/packages/terre2/assets/templates/WebGAL_Template/assets/index-f831d08d.js b/packages/terre2/assets/templates/WebGAL_Template/assets/index-338efd63.js similarity index 96% rename from packages/terre2/assets/templates/WebGAL_Template/assets/index-f831d08d.js rename to packages/terre2/assets/templates/WebGAL_Template/assets/index-338efd63.js index 79bf0e929..1d7dd9eb8 100644 --- a/packages/terre2/assets/templates/WebGAL_Template/assets/index-f831d08d.js +++ b/packages/terre2/assets/templates/WebGAL_Template/assets/index-338efd63.js @@ -38,7 +38,7 @@ object-assign Error generating stack: `+a.message+` `+a.stack}return{value:t,source:e,stack:i}}function C0(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var Sj=typeof WeakMap=="function"?WeakMap:Map;function RI(t,e,r){r=so(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Hd||(Hd=!0,M0=n),C0(t,e)},r}function II(t,e,r){r=so(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return C0(t,e),n(i)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){typeof n!="function"&&(Wi===null?Wi=new Set([this]):Wi.add(this),C0(t,e));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}var wj=typeof WeakSet=="function"?WeakSet:Set;function qT(t){var e=t.ref;if(e!==null)if(typeof e=="function")try{e(null)}catch(r){fo(t,r)}else e.current=null}function Ej(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(e.flags&256&&t!==null){var r=t.memoizedProps,n=t.memoizedState;t=e.stateNode,e=t.getSnapshotBeforeUpdate(e.elementType===e.type?r:vi(e.type,r),n),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:e.flags&256&&X1(e.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(he(163))}function Tj(t,e,r){switch(r.tag){case 0:case 11:case 15:case 22:if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{if((t.tag&3)===3){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{var i=t;n=i.next,i=i.tag,i&4&&i&1&&(UI(r,t),Mj(r,t)),t=n}while(t!==e)}return;case 1:t=r.stateNode,r.flags&4&&(e===null?t.componentDidMount():(n=r.elementType===r.type?e.memoizedProps:vi(r.type,e.memoizedProps),t.componentDidUpdate(n,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),e=r.updateQueue,e!==null&&RT(r,e,t);return;case 3:if(e=r.updateQueue,e!==null){if(t=null,r.child!==null)switch(r.child.tag){case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}RT(r,e,t)}return;case 5:t=r.stateNode,e===null&&r.flags&4&&rI(r.type,r.memoizedProps)&&t.focus();return;case 6:return;case 4:return;case 12:return;case 13:r.memoizedState===null&&(r=r.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&NR(r))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(he(163))}function KT(t,e){for(var r=t;;){if(r.tag===5){var n=r.stateNode;if(e)n=n.style,typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none";else{n=r.stateNode;var i=r.memoizedProps.style;i=i!=null&&i.hasOwnProperty("display")?i.display:null,n.style.display=ER("display",i)}}else if(r.tag===6)r.stateNode.nodeValue=e?"":r.memoizedProps;else if((r.tag!==23&&r.tag!==24||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function ZT(t,e){if(os&&typeof os.onCommitFiberUnmount=="function")try{os.onCommitFiberUnmount(z1,e)}catch{}switch(e.tag){case 0:case 11:case 14:case 15:case 22:if(t=e.updateQueue,t!==null&&(t=t.lastEffect,t!==null)){var r=t=t.next;do{var n=r,i=n.destroy;if(n=n.tag,i!==void 0)if(n&4)UI(e,r);else{n=e;try{i()}catch(a){fo(n,a)}}r=r.next}while(r!==t)}break;case 1:if(qT(e),t=e.stateNode,typeof t.componentWillUnmount=="function")try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(a){fo(e,a)}break;case 5:qT(e);break;case 4:kI(t,e)}}function QT(t){t.alternate=null,t.child=null,t.dependencies=null,t.firstEffect=null,t.lastEffect=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.return=null,t.updateQueue=null}function JT(t){return t.tag===5||t.tag===3||t.tag===4}function eA(t){e:{for(var e=t.return;e!==null;){if(JT(e))break e;e=e.return}throw Error(he(160))}var r=e;switch(e=r.stateNode,r.tag){case 5:var n=!1;break;case 3:e=e.containerInfo,n=!0;break;case 4:e=e.containerInfo,n=!0;break;default:throw Error(he(161))}r.flags&16&&(Rc(e,""),r.flags&=-17);e:t:for(r=t;;){for(;r.sibling===null;){if(r.return===null||JT(r.return)){r=null;break e}r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue t;r.child.return=r,r=r.child}if(!(r.flags&2)){r=r.stateNode;break e}}n?P0(t,r,e):O0(t,r,e)}function P0(t,e,r){var n=t.tag,i=n===5||n===6;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Md));else if(n!==4&&(t=t.child,t!==null))for(P0(t,e,r),t=t.sibling;t!==null;)P0(t,e,r),t=t.sibling}function O0(t,e,r){var n=t.tag,i=n===5||n===6;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(O0(t,e,r),t=t.sibling;t!==null;)O0(t,e,r),t=t.sibling}function kI(t,e){for(var r=e,n=!1,i,a;;){if(!n){n=r.return;e:for(;;){if(n===null)throw Error(he(160));switch(i=n.stateNode,n.tag){case 5:a=!1;break e;case 3:i=i.containerInfo,a=!0;break e;case 4:i=i.containerInfo,a=!0;break e}n=n.return}n=!0}if(r.tag===5||r.tag===6){e:for(var o=t,s=r,u=s;;)if(ZT(o,u),u.child!==null&&u.tag!==4)u.child.return=u,u=u.child;else{if(u===s)break e;for(;u.sibling===null;){if(u.return===null||u.return===s)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}a?(o=i,s=r.stateNode,o.nodeType===8?o.parentNode.removeChild(s):o.removeChild(s)):i.removeChild(r.stateNode)}else if(r.tag===4){if(r.child!==null){i=r.stateNode.containerInfo,a=!0,r.child.return=r,r=r.child;continue}}else if(ZT(t,r),r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return,r.tag===4&&(n=!1)}r.sibling.return=r.return,r=r.sibling}}function Ym(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do(n.tag&3)===3&&(t=n.destroy,n.destroy=void 0,t!==void 0&&t()),n=n.next;while(n!==r)}return;case 1:return;case 5:if(r=e.stateNode,r!=null){n=e.memoizedProps;var i=t!==null?t.memoizedProps:n;t=e.type;var a=e.updateQueue;if(e.updateQueue=null,a!==null){for(r[Fd]=n,t==="input"&&n.type==="radio"&&n.name!=null&&xR(r,n),s0(t,i),e=s0(t,n),i=0;ii&&(i=o),r&=~a}if(r=i,r=Zr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cj(r/1960))-r,10 component higher in the tree to provide a loading indicator or placeholder to display.`)}Xr!==5&&(Xr=2),u=nb(u,s),h=o;do{switch(h.tag){case 3:a=u,h.flags|=4096,e&=-e,h.lanes|=e;var b=RI(h,a,e);OT(h,b);break e;case 1:a=u;var S=h.type,w=h.stateNode;if(!(h.flags&64)&&(typeof S.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Wi===null||!Wi.has(w)))){h.flags|=4096,e&=-e,h.lanes|=e;var E=II(h,a,e);OT(h,E);break e}}h=h.return}while(h!==null)}jI(r)}catch(T){e=T,vr===r&&r!==null&&(vr=r=r.return);continue}break}while(1)}function DI(){var t=Yd.current;return Yd.current=Wd,t===null?Wd:t}function nc(t,e){var r=Le;Le|=16;var n=DI();fn===t&&Qr===e||xl(t,e);do try{Oj();break}catch(i){LI(t,i)}while(1);if(Y1(),Le=r,Yd.current=n,vr!==null)throw Error(he(261));return fn=null,Qr=0,Xr}function Oj(){for(;vr!==null;)BI(vr)}function Rj(){for(;vr!==null&&!fj();)BI(vr)}function BI(t){var e=$I(t.alternate,t,ps);t.memoizedProps=t.pendingProps,e===null?jI(t):vr=e,ib.current=null}function jI(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&2048){if(r=bj(e),r!==null){r.flags&=2047,vr=r;return}t!==null&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}else{if(r=xj(r,e,ps),r!==null){vr=r;return}if(r=e,r.tag!==24&&r.tag!==23||r.memoizedState===null||ps&1073741824||!(r.mode&4)){for(var n=0,i=r.child;i!==null;)n|=i.lanes|i.childLanes,i=i.sibling;r.childLanes=n}t!==null&&!(t.flags&2048)&&(t.firstEffect===null&&(t.firstEffect=e.firstEffect),e.lastEffect!==null&&(t.lastEffect!==null&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1o&&(s=o,o=b,b=s),s=pT(y,b),a=pT(y,o),s&&a&&(x.rangeCount!==1||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==a.node||x.focusOffset!==a.offset)&&(_=_.createRange(),_.setStart(s.node,s.offset),x.removeAllRanges(),b>o?(x.addRange(_),x.extend(a.node,a.offset)):(_.setEnd(a.node,a.offset),x.addRange(_)))))),_=[],x=y;x=x.parentNode;)x.nodeType===1&&_.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<_.length;y++)x=_[y],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}Jh=!!jm,Um=jm=null,t.current=r,Ee=n;do try{for(y=t;Ee!==null;){var S=Ee.flags;if(S&36&&Tj(y,Ee.alternate,Ee),S&128){_=void 0;var w=Ee.ref;if(w!==null){var E=Ee.stateNode;switch(Ee.tag){case 5:_=E;break;default:_=E}typeof w=="function"?w(_):w.current=_}}Ee=Ee.nextEffect}}catch(T){if(Ee===null)throw Error(he(330));fo(Ee,T),Ee=Ee.nextEffect}while(Ee!==null);Ee=null,dj(),Le=i}else t.current=r;if(bo)bo=!1,yc=t,rc=e;else for(Ee=n;Ee!==null;)e=Ee.nextEffect,Ee.nextEffect=null,Ee.flags&8&&(S=Ee,S.sibling=null,S.stateNode=null),Ee=e;if(n=t.pendingLanes,n===0&&(Wi=null),n===1?t===L0?_c++:(_c=0,L0=t):_c=0,r=r.stateNode,os&&typeof os.onCommitFiberRoot=="function")try{os.onCommitFiberRoot(z1,r,void 0,(r.current.flags&64)===64)}catch{}if(ni(t,Zr()),Hd)throw Hd=!1,t=M0,M0=null,t;return Le&8||oa(),null}function kj(){for(;Ee!==null;){var t=Ee.alternate;od||xc===null||(Ee.flags&8?eT(Ee,xc)&&(od=!0):Ee.tag===13&&Aj(t,Ee)&&eT(Ee,xc)&&(od=!0));var e=Ee.flags;e&256&&Ej(t,Ee),!(e&512)||bo||(bo=!0,Bc(97,function(){return Ro(),null})),Ee=Ee.nextEffect}}function Ro(){if(rc!==90){var t=97Zr()-ob?xl(t,0):ab|=r),ni(t,e)}function Lj(t,e){var r=t.stateNode;r!==null&&r.delete(e),e=0,e===0&&(e=t.mode,e&2?e&4?(Ta===0&&(Ta=eu),e=Qs(62914560&~Ta),e===0&&(e=4194304)):e=Ml()===99?1:2:e=1),r=Dn(),t=Kp(t,e),t!==null&&(Vp(t,e,r),ni(t,r))}var $I;$I=function(t,e,r){var n=e.lanes;if(t!==null)if(t.memoizedProps!==e.pendingProps||An.current)yi=!0;else if(r&n)yi=!!(t.flags&16384);else{switch(yi=!1,e.tag){case 3:VT(e),Xm();break;case 5:MT(e);break;case 1:Cn(e.type)&&rd(e);break;case 4:b0(e,e.stateNode.containerInfo);break;case 10:n=e.memoizedProps.value;var i=e.type._context;Xt(Ld,i._currentValue),i._currentValue=n;break;case 13:if(e.memoizedState!==null)return r&e.child.childLanes?GT(t,e,r):(Xt(Gt,Gt.current&1),e=Pa(t,e,r),e!==null?e.sibling:null);Xt(Gt,Gt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&64){if(n)return HT(t,e,r);e.flags|=64}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xt(Gt,Gt.current),n)break;return null;case 23:case 24:return e.lanes=0,zm(t,e,r)}return Pa(t,e,r)}else yi=!1;switch(e.lanes=0,e.tag){case 2:if(n=e.type,t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=kl(e,Jr.current),gl(e,r),i=J1(null,e,n,t,i,r),e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,Cn(n)){var a=!0;rd(e)}else a=!1;e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,q1(e);var o=n.getDerivedStateFromProps;typeof o=="function"&&jd(e,n,o,t),i.updater=Hp,e.stateNode=i,i._reactInternals=e,x0(e,n,t,r),e=T0(null,e,n,!0,a,r)}else e.tag=0,Sn(null,e,i,r),e=e.child;return e;case 16:i=e.elementType;e:{switch(t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,a=i._init,i=a(i._payload),e.type=i,a=e.tag=Bj(i),t=vi(i,t),a){case 0:e=E0(null,e,i,t,r);break e;case 1:e=$T(null,e,i,t,r);break e;case 11:e=jT(null,e,i,t,r);break e;case 14:e=UT(null,e,i,vi(i.type,t),n,r);break e}throw Error(he(306,i,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),E0(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),$T(t,e,n,i,r);case 3:if(VT(e),n=e.updateQueue,t===null||n===null)throw Error(he(282));if(n=e.pendingProps,i=e.memoizedState,i=i!==null?i.element:null,hI(t,e),jc(e,n,null,r),n=e.memoizedState.element,n===i)Xm(),e=Pa(t,e,r);else{if(i=e.stateNode,(a=i.hydrate)&&(Ja=ml(e.stateNode.containerInfo.firstChild),Ca=e,a=qi=!0),a){if(t=i.mutableSourceEagerHydrationData,t!=null)for(i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(GI)}catch(t){console.error(t)}}GI(),dR.exports=ii;var XI=dR.exports;const ea=gn(XI);const zj="_Title_main_xpe81_1",Wj="_Title_buttonList_xpe81_8",Yj="_Title_button_xpe81_8",Hj="_Title_button_text_xpe81_41",qj="_Title_backup_background_xpe81_48",In={Title_main:zj,Title_buttonList:Wj,Title_button:Yj,Title_button_text:Hj,Title_backup_background:qj};function gi(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n3?e.i-4:e.i:Array.isArray(t)?1:hb(t)?2:db(t)?3:0}function Sl(t,e){return nu(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Kj(t,e){return nu(t)===2?t.get(e):t[e]}function zI(t,e,r){var n=nu(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function WI(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function hb(t){return rU&&t instanceof Map}function db(t){return nU&&t instanceof Set}function Vo(t){return t.o||t.t}function pb(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=HI(t);delete e[kt];for(var r=wl(e),n=0;n1&&(t.set=t.add=t.clear=t.delete=Zj),Object.freeze(t),e&&vs(t,function(r,n){return vb(n,!0)},!0)),t}function Zj(){gi(2)}function mb(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ki(t){var e=$0[t];return e||gi(18,t),e}function Qj(t,e){$0[t]||($0[t]=e)}function B0(){return Gc}function Zm(t,e){e&&(Ki("Patches"),t.u=[],t.s=[],t.v=e)}function Kd(t){j0(t),t.p.forEach(Jj),t.p=null}function j0(t){t===Gc&&(Gc=t.l)}function iA(t){return Gc={p:[],l:Gc,h:t,m:!0,_:0}}function Jj(t){var e=t[kt];e.i===0||e.i===1?e.j():e.g=!0}function Qm(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||Ki("ES5").S(e,t,n),n?(r[kt].P&&(Kd(e),gi(4)),Na(t)&&(t=Zd(e,t),e.l||Qd(e,t)),e.u&&Ki("Patches").M(r[kt].t,t,e.u,e.s)):t=Zd(e,r,[]),Kd(e),e.u&&e.v(e.u,e.s),t!==YI?t:void 0}function Zd(t,e,r){if(mb(e))return e;var n=e[kt];if(!n)return vs(e,function(s,u){return aA(t,n,e,s,u,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Qd(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=pb(n.k):n.o,a=i,o=!1;n.i===3&&(a=new Set(i),i.clear(),o=!0),vs(a,function(s,u){return aA(t,n,i,s,u,r,o)}),Qd(t,i,!1),r&&t.u&&Ki("Patches").N(n,r,t.u,t.s)}return n.o}function aA(t,e,r,n,i,a,o){if(wo(i)){var s=Zd(t,i,a&&e&&e.i!==3&&!Sl(e.R,n)?a.concat(n):void 0);if(zI(r,n,s),!wo(s))return;t.m=!1}else o&&r.add(i);if(Na(i)&&!mb(i)){if(!t.h.D&&t._<1)return;Zd(t,i),e&&e.A.l||Qd(t,i)}}function Qd(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&vb(e,r)}function Jm(t,e){var r=t[kt];return(r?Vo(r):t)[e]}function oA(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function qa(t){t.P||(t.P=!0,t.l&&qa(t.l))}function eg(t){t.o||(t.o=pb(t.t))}function U0(t,e,r){var n=hb(e)?Ki("MapSet").F(e,r):db(e)?Ki("MapSet").T(e,r):t.O?function(i,a){var o=Array.isArray(i),s={i:o?1:0,A:a?a.A:B0(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=s,l=Xc;o&&(u=[s],l=ic);var c=Proxy.revocable(u,l),f=c.revoke,h=c.proxy;return s.k=h,s.j=f,h}(e,r):Ki("ES5").J(e,r);return(r?r.A:B0()).p.push(n),n}function eU(t){return wo(t)||gi(22,t),function e(r){if(!Na(r))return r;var n,i=r[kt],a=nu(r);if(i){if(!i.P&&(i.i<4||!Ki("ES5").K(i)))return i.t;i.I=!0,n=sA(r,a),i.I=!1}else n=sA(r,a);return vs(n,function(o,s){i&&Kj(i.t,o)===s||zI(n,o,e(s))}),a===3?new Set(n):n}(t)}function sA(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return pb(t)}function tU(){function t(a,o){var s=i[a];return s?s.enumerable=o:i[a]=s={configurable:!0,enumerable:o,get:function(){var u=this[kt];return Xc.get(u,a)},set:function(u){var l=this[kt];Xc.set(l,a,u)}},s}function e(a){for(var o=a.length-1;o>=0;o--){var s=a[o][kt];if(!s.P)switch(s.i){case 5:n(s)&&qa(s);break;case 4:r(s)&&qa(s)}}}function r(a){for(var o=a.t,s=a.k,u=wl(s),l=u.length-1;l>=0;l--){var c=u[l];if(c!==kt){var f=o[c];if(f===void 0&&!Sl(o,c))return!0;var h=s[c],d=h&&h[kt];if(d?d.t!==f:!WI(h,f))return!0}}var p=!!o[kt];return u.length!==wl(o).length+(p?0:1)}function n(a){var o=a.k;if(o.length!==a.t.length)return!0;var s=Object.getOwnPropertyDescriptor(o,o.length-1);if(s&&!s.get)return!0;for(var u=0;u1?m-1:0),_=1;_1?c-1:0),h=1;h=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var o=Ki("Patches").$;return wo(r)?o(r,n):this.produce(r,function(s){return o(s,n)})},t}(),jn=new aU,qI=jn.produce;jn.produceWithPatches.bind(jn);jn.setAutoFreeze.bind(jn);jn.setUseProxies.bind(jn);jn.applyPatches.bind(jn);jn.createDraft.bind(jn);jn.finishDraft.bind(jn);function Rr(t){"@babel/helpers - typeof";return Rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(t)}function oU(t,e){if(Rr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Rr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function KI(t){var e=oU(t,"string");return Rr(e)=="symbol"?e:e+""}function $n(t,e,r){return e=KI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function hA(t){for(var e=1;e"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Hr(1));return r(ZI)(t,e)}if(typeof t!="function")throw new Error(Hr(2));var i=t,a=e,o=[],s=o,u=!1;function l(){s===o&&(s=o.slice())}function c(){if(u)throw new Error(Hr(3));return a}function f(v){if(typeof v!="function")throw new Error(Hr(4));if(u)throw new Error(Hr(5));var g=!0;return l(),s.push(v),function(){if(g){if(u)throw new Error(Hr(6));g=!1,l();var y=s.indexOf(v);s.splice(y,1),o=null}}}function h(v){if(!sU(v))throw new Error(Hr(7));if(typeof v.type>"u")throw new Error(Hr(8));if(u)throw new Error(Hr(9));try{u=!0,a=i(a,v)}finally{u=!1}for(var g=o=s,m=0;m"u")throw new Error(Hr(12));if(typeof r(void 0,{type:Jd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hr(13))})}function uU(t){for(var e=Object.keys(t),r={},n=0;n"u")throw l&&l.type,new Error(Hr(14));f[d]=g,c=c||g!==v}return c=c||a.length!==Object.keys(u).length,c?f:u}}function ep(){for(var t=arguments.length,e=new Array(t),r=0;r0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]-1}var KU=qU,ZU=Jp;function QU(t,e){var r=this.__data__,n=ZU(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var JU=QU,e$=LU,t$=XU,r$=YU,n$=KU,i$=JU;function iu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=i6}var Ab=a6,o6=Lf,s6=Ab,l6=Ps,u6="[object Arguments]",c6="[object Array]",f6="[object Boolean]",h6="[object Date]",d6="[object Error]",p6="[object Function]",v6="[object Map]",m6="[object Number]",g6="[object Object]",y6="[object RegExp]",_6="[object Set]",x6="[object String]",b6="[object WeakMap]",S6="[object ArrayBuffer]",w6="[object DataView]",E6="[object Float32Array]",T6="[object Float64Array]",A6="[object Int8Array]",C6="[object Int16Array]",P6="[object Int32Array]",O6="[object Uint8Array]",R6="[object Uint8ClampedArray]",I6="[object Uint16Array]",k6="[object Uint32Array]",At={};At[E6]=At[T6]=At[A6]=At[C6]=At[P6]=At[O6]=At[R6]=At[I6]=At[k6]=!0;At[u6]=At[c6]=At[S6]=At[f6]=At[w6]=At[h6]=At[d6]=At[p6]=At[v6]=At[m6]=At[g6]=At[y6]=At[_6]=At[x6]=At[b6]=!1;function M6(t){return l6(t)&&s6(t.length)&&!!At[o6(t)]}var F6=M6;function N6(t){return function(e){return t(e)}}var Cb=N6,rp={exports:{}};rp.exports;(function(t,e){var r=nk,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s})(rp,rp.exports);var Pb=rp.exports,L6=F6,D6=Cb,CA=Pb,PA=CA&&CA.isTypedArray,B6=PA?D6(PA):L6,ck=B6,j6=$V,U6=uk,$6=Da,V6=Eb,G6=Tb,X6=ck,z6=Object.prototype,W6=z6.hasOwnProperty;function Y6(t,e){var r=$6(t),n=!r&&U6(t),i=!r&&!n&&V6(t),a=!r&&!n&&!i&&X6(t),o=r||n||i||a,s=o?j6(t.length,String):[],u=s.length;for(var l in t)(e||W6.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||G6(l,u)))&&s.push(l);return s}var fk=Y6,H6=Object.prototype;function q6(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||H6;return t===r}var Ob=q6;function K6(t,e){return function(r){return t(e(r))}}var hk=K6,Z6=hk,Q6=Z6(Object.keys,Object),J6=Q6,e5=Ob,t5=J6,r5=Object.prototype,n5=r5.hasOwnProperty;function i5(t){if(!e5(t))return t5(t);var e=[];for(var r in Object(t))n5.call(t,r)&&r!="constructor"&&e.push(r);return e}var a5=i5,o5=ak,s5=Ab;function l5(t){return t!=null&&s5(t.length)&&!o5(t)}var dk=l5,u5=fk,c5=a5,f5=dk;function h5(t){return f5(t)?u5(t):c5(t)}var iv=h5,d5=nv,p5=iv;function v5(t,e){return t&&d5(e,p5(e),t)}var m5=v5;function g5(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var y5=g5,_5=sa,x5=Ob,b5=y5,S5=Object.prototype,w5=S5.hasOwnProperty;function E5(t){if(!_5(t))return b5(t);var e=x5(t),r=[];for(var n in t)n=="constructor"&&(e||!w5.call(t,n))||r.push(n);return r}var T5=E5,A5=fk,C5=T5,P5=dk;function O5(t){return P5(t)?A5(t,!0):C5(t)}var Rb=O5,R5=nv,I5=Rb;function k5(t,e){return t&&R5(e,I5(e),t)}var M5=k5,np={exports:{}};np.exports;(function(t,e){var r=Ei,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(l,c){if(c)return l.slice();var f=l.length,h=s?s(f):new l.constructor(f);return l.copy(h),h}t.exports=u})(np,np.exports);var F5=np.exports;function N5(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r(t[t.say=0]="say",t[t.changeBg=1]="changeBg",t[t.changeFigure=2]="changeFigure",t[t.bgm=3]="bgm",t[t.video=4]="video",t[t.pixi=5]="pixi",t[t.pixiInit=6]="pixiInit",t[t.intro=7]="intro",t[t.miniAvatar=8]="miniAvatar",t[t.changeScene=9]="changeScene",t[t.choose=10]="choose",t[t.end=11]="end",t[t.setComplexAnimation=12]="setComplexAnimation",t[t.setFilter=13]="setFilter",t[t.label=14]="label",t[t.jumpLabel=15]="jumpLabel",t[t.chooseLabel=16]="chooseLabel",t[t.setVar=17]="setVar",t[t.if=18]="if",t[t.callScene=19]="callScene",t[t.showVars=20]="showVars",t[t.unlockCg=21]="unlockCg",t[t.unlockBgm=22]="unlockBgm",t[t.filmMode=23]="filmMode",t[t.setTextbox=24]="setTextbox",t[t.setAnimation=25]="setAnimation",t[t.playEffect=26]="playEffect",t[t.setTempAnimation=27]="setTempAnimation",t[t.comment=28]="comment",t[t.setTransform=29]="setTransform",t[t.setTransition=30]="setTransition",t[t.getUserInput=31]="getUserInput",t[t.applyStyle=32]="applyStyle",t))(Qe||{});const dh={BGMAIN:"bg-main",FIG_C:"fig-center",FIG_L:"fig-left",FIG_R:"fig-right"},Ck={oldBgName:"",bgName:"",figName:"",figNameLeft:"",figNameRight:"",freeFigure:[],figureAssociatedAnimation:[],showText:"",showTextSize:-1,showName:"",command:"",choose:[],vocal:"",playVocal:"",vocalVolume:100,bgm:{src:"",enter:0,volume:100},uiSe:"",miniAvatar:"",GameVar:{},effects:[],bgFilter:"",bgTransform:"",PerformList:[],currentDialogKey:"initial",live2dMotion:[],live2dExpression:[],currentConcatDialogPrev:"",enableFilm:"",isDisableTextbox:!1,replacedUIlable:{},figureMetaData:{}},Mb=Qp({name:"stage",initialState:Jt(Ck),reducers:{resetStageState:(t,e)=>{Object.assign(t,e.payload)},setStage:(t,e)=>{t[e.payload.key]=e.payload.value},setStageVar:(t,e)=>{t.GameVar[e.payload.key]=e.payload.value},updateEffect:(t,e)=>{const{target:r,transform:n}=e.payload;if(![dh.BGMAIN,dh.FIG_C,dh.FIG_L,dh.FIG_R,...t.freeFigure.map(o=>o.key)].includes(r))return;const a=t.effects.findIndex(o=>o.target===r);a>=0?t.effects[a].transform=n:t.effects.push({target:r,transform:n})},removeEffectByTargetId:(t,e)=>{const r=t.effects.findIndex(n=>n.target===e.payload);r>=0&&t.effects.splice(r,1)},addPerform:(t,e)=>{t.PerformList.push(e.payload)},removePerformByName:(t,e)=>{for(let r=0;r{for(let r=0;r{const r=t.freeFigure,n=e.payload,i=r.findIndex(a=>a.key===n.key);if(i>=0)if(n.name===""){r.splice(i,1);const a=t.figureAssociatedAnimation.findIndex(o=>o.targetId===n.key);t.figureAssociatedAnimation.splice(a,1)}else r[i].basePosition=n.basePosition,r[i].name=n.name;else n.name!==""&&r.push(n)},setLive2dMotion:(t,e)=>{const{target:r,motion:n,overrideBounds:i}=e.payload,a=t.live2dMotion.findIndex(o=>o.target===r);a<0?t.live2dMotion.push({target:r,motion:n,overrideBounds:i}):(t.live2dMotion[a].motion=n,t.live2dMotion[a].overrideBounds=i)},setLive2dExpression:(t,e)=>{const{target:r,expression:n}=e.payload,i=t.live2dExpression.findIndex(a=>a.target===r);i<0?t.live2dExpression.push({target:r,expression:n}):t.live2dExpression[i].expression=n},replaceUIlable:(t,e)=>{t.replacedUIlable[e.payload[0]]=e.payload[1]},setFigureMetaData:(t,e)=>{e.payload[3]?t.figureMetaData[e.payload[0]]&&delete t.figureMetaData[e.payload[0]]:(console.log("yeah"),t.figureMetaData[e.payload[0]]||(t.figureMetaData[e.payload[0]]={}),t.figureMetaData[e.payload[0]][e.payload[1]]=e.payload[2])}}}),{resetStageState:ov,setStage:Ge,setStageVar:Pk}=Mb.actions,Tr=Mb.actions,rz=Mb.reducer;function ph(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ok={exports:{}};/*! +Add a component higher in the tree to provide a loading indicator or placeholder to display.`)}Xr!==5&&(Xr=2),u=nb(u,s),h=o;do{switch(h.tag){case 3:a=u,h.flags|=4096,e&=-e,h.lanes|=e;var b=RI(h,a,e);OT(h,b);break e;case 1:a=u;var S=h.type,w=h.stateNode;if(!(h.flags&64)&&(typeof S.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Wi===null||!Wi.has(w)))){h.flags|=4096,e&=-e,h.lanes|=e;var E=II(h,a,e);OT(h,E);break e}}h=h.return}while(h!==null)}jI(r)}catch(T){e=T,vr===r&&r!==null&&(vr=r=r.return);continue}break}while(1)}function DI(){var t=Yd.current;return Yd.current=Wd,t===null?Wd:t}function nc(t,e){var r=Le;Le|=16;var n=DI();fn===t&&Qr===e||xl(t,e);do try{Oj();break}catch(i){LI(t,i)}while(1);if(Y1(),Le=r,Yd.current=n,vr!==null)throw Error(he(261));return fn=null,Qr=0,Xr}function Oj(){for(;vr!==null;)BI(vr)}function Rj(){for(;vr!==null&&!fj();)BI(vr)}function BI(t){var e=$I(t.alternate,t,ps);t.memoizedProps=t.pendingProps,e===null?jI(t):vr=e,ib.current=null}function jI(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&2048){if(r=bj(e),r!==null){r.flags&=2047,vr=r;return}t!==null&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}else{if(r=xj(r,e,ps),r!==null){vr=r;return}if(r=e,r.tag!==24&&r.tag!==23||r.memoizedState===null||ps&1073741824||!(r.mode&4)){for(var n=0,i=r.child;i!==null;)n|=i.lanes|i.childLanes,i=i.sibling;r.childLanes=n}t!==null&&!(t.flags&2048)&&(t.firstEffect===null&&(t.firstEffect=e.firstEffect),e.lastEffect!==null&&(t.lastEffect!==null&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1o&&(s=o,o=b,b=s),s=pT(y,b),a=pT(y,o),s&&a&&(x.rangeCount!==1||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==a.node||x.focusOffset!==a.offset)&&(_=_.createRange(),_.setStart(s.node,s.offset),x.removeAllRanges(),b>o?(x.addRange(_),x.extend(a.node,a.offset)):(_.setEnd(a.node,a.offset),x.addRange(_)))))),_=[],x=y;x=x.parentNode;)x.nodeType===1&&_.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<_.length;y++)x=_[y],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}Jh=!!jm,Um=jm=null,t.current=r,Ee=n;do try{for(y=t;Ee!==null;){var S=Ee.flags;if(S&36&&Tj(y,Ee.alternate,Ee),S&128){_=void 0;var w=Ee.ref;if(w!==null){var E=Ee.stateNode;switch(Ee.tag){case 5:_=E;break;default:_=E}typeof w=="function"?w(_):w.current=_}}Ee=Ee.nextEffect}}catch(T){if(Ee===null)throw Error(he(330));fo(Ee,T),Ee=Ee.nextEffect}while(Ee!==null);Ee=null,dj(),Le=i}else t.current=r;if(bo)bo=!1,yc=t,rc=e;else for(Ee=n;Ee!==null;)e=Ee.nextEffect,Ee.nextEffect=null,Ee.flags&8&&(S=Ee,S.sibling=null,S.stateNode=null),Ee=e;if(n=t.pendingLanes,n===0&&(Wi=null),n===1?t===L0?_c++:(_c=0,L0=t):_c=0,r=r.stateNode,os&&typeof os.onCommitFiberRoot=="function")try{os.onCommitFiberRoot(z1,r,void 0,(r.current.flags&64)===64)}catch{}if(ni(t,Zr()),Hd)throw Hd=!1,t=M0,M0=null,t;return Le&8||oa(),null}function kj(){for(;Ee!==null;){var t=Ee.alternate;od||xc===null||(Ee.flags&8?eT(Ee,xc)&&(od=!0):Ee.tag===13&&Aj(t,Ee)&&eT(Ee,xc)&&(od=!0));var e=Ee.flags;e&256&&Ej(t,Ee),!(e&512)||bo||(bo=!0,Bc(97,function(){return Ro(),null})),Ee=Ee.nextEffect}}function Ro(){if(rc!==90){var t=97Zr()-ob?xl(t,0):ab|=r),ni(t,e)}function Lj(t,e){var r=t.stateNode;r!==null&&r.delete(e),e=0,e===0&&(e=t.mode,e&2?e&4?(Ta===0&&(Ta=eu),e=Qs(62914560&~Ta),e===0&&(e=4194304)):e=Ml()===99?1:2:e=1),r=Dn(),t=Kp(t,e),t!==null&&(Vp(t,e,r),ni(t,r))}var $I;$I=function(t,e,r){var n=e.lanes;if(t!==null)if(t.memoizedProps!==e.pendingProps||An.current)yi=!0;else if(r&n)yi=!!(t.flags&16384);else{switch(yi=!1,e.tag){case 3:VT(e),Xm();break;case 5:MT(e);break;case 1:Cn(e.type)&&rd(e);break;case 4:b0(e,e.stateNode.containerInfo);break;case 10:n=e.memoizedProps.value;var i=e.type._context;Xt(Ld,i._currentValue),i._currentValue=n;break;case 13:if(e.memoizedState!==null)return r&e.child.childLanes?GT(t,e,r):(Xt(Gt,Gt.current&1),e=Pa(t,e,r),e!==null?e.sibling:null);Xt(Gt,Gt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&64){if(n)return HT(t,e,r);e.flags|=64}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xt(Gt,Gt.current),n)break;return null;case 23:case 24:return e.lanes=0,zm(t,e,r)}return Pa(t,e,r)}else yi=!1;switch(e.lanes=0,e.tag){case 2:if(n=e.type,t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=kl(e,Jr.current),gl(e,r),i=J1(null,e,n,t,i,r),e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,Cn(n)){var a=!0;rd(e)}else a=!1;e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,q1(e);var o=n.getDerivedStateFromProps;typeof o=="function"&&jd(e,n,o,t),i.updater=Hp,e.stateNode=i,i._reactInternals=e,x0(e,n,t,r),e=T0(null,e,n,!0,a,r)}else e.tag=0,Sn(null,e,i,r),e=e.child;return e;case 16:i=e.elementType;e:{switch(t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,a=i._init,i=a(i._payload),e.type=i,a=e.tag=Bj(i),t=vi(i,t),a){case 0:e=E0(null,e,i,t,r);break e;case 1:e=$T(null,e,i,t,r);break e;case 11:e=jT(null,e,i,t,r);break e;case 14:e=UT(null,e,i,vi(i.type,t),n,r);break e}throw Error(he(306,i,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),E0(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),$T(t,e,n,i,r);case 3:if(VT(e),n=e.updateQueue,t===null||n===null)throw Error(he(282));if(n=e.pendingProps,i=e.memoizedState,i=i!==null?i.element:null,hI(t,e),jc(e,n,null,r),n=e.memoizedState.element,n===i)Xm(),e=Pa(t,e,r);else{if(i=e.stateNode,(a=i.hydrate)&&(Ja=ml(e.stateNode.containerInfo.firstChild),Ca=e,a=qi=!0),a){if(t=i.mutableSourceEagerHydrationData,t!=null)for(i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(GI)}catch(t){console.error(t)}}GI(),dR.exports=ii;var XI=dR.exports;const ea=gn(XI);const zj="_Title_main_xpe81_1",Wj="_Title_buttonList_xpe81_8",Yj="_Title_button_xpe81_8",Hj="_Title_button_text_xpe81_41",qj="_Title_backup_background_xpe81_48",In={Title_main:zj,Title_buttonList:Wj,Title_button:Yj,Title_button_text:Hj,Title_backup_background:qj};function gi(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n3?e.i-4:e.i:Array.isArray(t)?1:hb(t)?2:db(t)?3:0}function Sl(t,e){return nu(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Kj(t,e){return nu(t)===2?t.get(e):t[e]}function zI(t,e,r){var n=nu(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function WI(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function hb(t){return rU&&t instanceof Map}function db(t){return nU&&t instanceof Set}function Vo(t){return t.o||t.t}function pb(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=HI(t);delete e[kt];for(var r=wl(e),n=0;n1&&(t.set=t.add=t.clear=t.delete=Zj),Object.freeze(t),e&&vs(t,function(r,n){return vb(n,!0)},!0)),t}function Zj(){gi(2)}function mb(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ki(t){var e=$0[t];return e||gi(18,t),e}function Qj(t,e){$0[t]||($0[t]=e)}function B0(){return Gc}function Zm(t,e){e&&(Ki("Patches"),t.u=[],t.s=[],t.v=e)}function Kd(t){j0(t),t.p.forEach(Jj),t.p=null}function j0(t){t===Gc&&(Gc=t.l)}function iA(t){return Gc={p:[],l:Gc,h:t,m:!0,_:0}}function Jj(t){var e=t[kt];e.i===0||e.i===1?e.j():e.g=!0}function Qm(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||Ki("ES5").S(e,t,n),n?(r[kt].P&&(Kd(e),gi(4)),Na(t)&&(t=Zd(e,t),e.l||Qd(e,t)),e.u&&Ki("Patches").M(r[kt].t,t,e.u,e.s)):t=Zd(e,r,[]),Kd(e),e.u&&e.v(e.u,e.s),t!==YI?t:void 0}function Zd(t,e,r){if(mb(e))return e;var n=e[kt];if(!n)return vs(e,function(s,u){return aA(t,n,e,s,u,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Qd(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=pb(n.k):n.o,a=i,o=!1;n.i===3&&(a=new Set(i),i.clear(),o=!0),vs(a,function(s,u){return aA(t,n,i,s,u,r,o)}),Qd(t,i,!1),r&&t.u&&Ki("Patches").N(n,r,t.u,t.s)}return n.o}function aA(t,e,r,n,i,a,o){if(wo(i)){var s=Zd(t,i,a&&e&&e.i!==3&&!Sl(e.R,n)?a.concat(n):void 0);if(zI(r,n,s),!wo(s))return;t.m=!1}else o&&r.add(i);if(Na(i)&&!mb(i)){if(!t.h.D&&t._<1)return;Zd(t,i),e&&e.A.l||Qd(t,i)}}function Qd(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&vb(e,r)}function Jm(t,e){var r=t[kt];return(r?Vo(r):t)[e]}function oA(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function qa(t){t.P||(t.P=!0,t.l&&qa(t.l))}function eg(t){t.o||(t.o=pb(t.t))}function U0(t,e,r){var n=hb(e)?Ki("MapSet").F(e,r):db(e)?Ki("MapSet").T(e,r):t.O?function(i,a){var o=Array.isArray(i),s={i:o?1:0,A:a?a.A:B0(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=s,l=Xc;o&&(u=[s],l=ic);var c=Proxy.revocable(u,l),f=c.revoke,h=c.proxy;return s.k=h,s.j=f,h}(e,r):Ki("ES5").J(e,r);return(r?r.A:B0()).p.push(n),n}function eU(t){return wo(t)||gi(22,t),function e(r){if(!Na(r))return r;var n,i=r[kt],a=nu(r);if(i){if(!i.P&&(i.i<4||!Ki("ES5").K(i)))return i.t;i.I=!0,n=sA(r,a),i.I=!1}else n=sA(r,a);return vs(n,function(o,s){i&&Kj(i.t,o)===s||zI(n,o,e(s))}),a===3?new Set(n):n}(t)}function sA(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return pb(t)}function tU(){function t(a,o){var s=i[a];return s?s.enumerable=o:i[a]=s={configurable:!0,enumerable:o,get:function(){var u=this[kt];return Xc.get(u,a)},set:function(u){var l=this[kt];Xc.set(l,a,u)}},s}function e(a){for(var o=a.length-1;o>=0;o--){var s=a[o][kt];if(!s.P)switch(s.i){case 5:n(s)&&qa(s);break;case 4:r(s)&&qa(s)}}}function r(a){for(var o=a.t,s=a.k,u=wl(s),l=u.length-1;l>=0;l--){var c=u[l];if(c!==kt){var f=o[c];if(f===void 0&&!Sl(o,c))return!0;var h=s[c],d=h&&h[kt];if(d?d.t!==f:!WI(h,f))return!0}}var p=!!o[kt];return u.length!==wl(o).length+(p?0:1)}function n(a){var o=a.k;if(o.length!==a.t.length)return!0;var s=Object.getOwnPropertyDescriptor(o,o.length-1);if(s&&!s.get)return!0;for(var u=0;u1?m-1:0),_=1;_1?c-1:0),h=1;h=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var o=Ki("Patches").$;return wo(r)?o(r,n):this.produce(r,function(s){return o(s,n)})},t}(),jn=new aU,qI=jn.produce;jn.produceWithPatches.bind(jn);jn.setAutoFreeze.bind(jn);jn.setUseProxies.bind(jn);jn.applyPatches.bind(jn);jn.createDraft.bind(jn);jn.finishDraft.bind(jn);function Rr(t){"@babel/helpers - typeof";return Rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(t)}function oU(t,e){if(Rr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Rr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function KI(t){var e=oU(t,"string");return Rr(e)=="symbol"?e:e+""}function $n(t,e,r){return e=KI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function hA(t){for(var e=1;e"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Hr(1));return r(ZI)(t,e)}if(typeof t!="function")throw new Error(Hr(2));var i=t,a=e,o=[],s=o,u=!1;function l(){s===o&&(s=o.slice())}function c(){if(u)throw new Error(Hr(3));return a}function f(v){if(typeof v!="function")throw new Error(Hr(4));if(u)throw new Error(Hr(5));var g=!0;return l(),s.push(v),function(){if(g){if(u)throw new Error(Hr(6));g=!1,l();var y=s.indexOf(v);s.splice(y,1),o=null}}}function h(v){if(!sU(v))throw new Error(Hr(7));if(typeof v.type>"u")throw new Error(Hr(8));if(u)throw new Error(Hr(9));try{u=!0,a=i(a,v)}finally{u=!1}for(var g=o=s,m=0;m"u")throw new Error(Hr(12));if(typeof r(void 0,{type:Jd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hr(13))})}function uU(t){for(var e=Object.keys(t),r={},n=0;n"u")throw l&&l.type,new Error(Hr(14));f[d]=g,c=c||g!==v}return c=c||a.length!==Object.keys(u).length,c?f:u}}function ep(){for(var t=arguments.length,e=new Array(t),r=0;r0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]-1}var KU=qU,ZU=Jp;function QU(t,e){var r=this.__data__,n=ZU(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var JU=QU,e$=LU,t$=XU,r$=YU,n$=KU,i$=JU;function iu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=i6}var Ab=a6,o6=Lf,s6=Ab,l6=Ps,u6="[object Arguments]",c6="[object Array]",f6="[object Boolean]",h6="[object Date]",d6="[object Error]",p6="[object Function]",v6="[object Map]",m6="[object Number]",g6="[object Object]",y6="[object RegExp]",_6="[object Set]",x6="[object String]",b6="[object WeakMap]",S6="[object ArrayBuffer]",w6="[object DataView]",E6="[object Float32Array]",T6="[object Float64Array]",A6="[object Int8Array]",C6="[object Int16Array]",P6="[object Int32Array]",O6="[object Uint8Array]",R6="[object Uint8ClampedArray]",I6="[object Uint16Array]",k6="[object Uint32Array]",At={};At[E6]=At[T6]=At[A6]=At[C6]=At[P6]=At[O6]=At[R6]=At[I6]=At[k6]=!0;At[u6]=At[c6]=At[S6]=At[f6]=At[w6]=At[h6]=At[d6]=At[p6]=At[v6]=At[m6]=At[g6]=At[y6]=At[_6]=At[x6]=At[b6]=!1;function M6(t){return l6(t)&&s6(t.length)&&!!At[o6(t)]}var F6=M6;function N6(t){return function(e){return t(e)}}var Cb=N6,rp={exports:{}};rp.exports;(function(t,e){var r=nk,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s})(rp,rp.exports);var Pb=rp.exports,L6=F6,D6=Cb,CA=Pb,PA=CA&&CA.isTypedArray,B6=PA?D6(PA):L6,ck=B6,j6=$V,U6=uk,$6=Da,V6=Eb,G6=Tb,X6=ck,z6=Object.prototype,W6=z6.hasOwnProperty;function Y6(t,e){var r=$6(t),n=!r&&U6(t),i=!r&&!n&&V6(t),a=!r&&!n&&!i&&X6(t),o=r||n||i||a,s=o?j6(t.length,String):[],u=s.length;for(var l in t)(e||W6.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||G6(l,u)))&&s.push(l);return s}var fk=Y6,H6=Object.prototype;function q6(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||H6;return t===r}var Ob=q6;function K6(t,e){return function(r){return t(e(r))}}var hk=K6,Z6=hk,Q6=Z6(Object.keys,Object),J6=Q6,e5=Ob,t5=J6,r5=Object.prototype,n5=r5.hasOwnProperty;function i5(t){if(!e5(t))return t5(t);var e=[];for(var r in Object(t))n5.call(t,r)&&r!="constructor"&&e.push(r);return e}var a5=i5,o5=ak,s5=Ab;function l5(t){return t!=null&&s5(t.length)&&!o5(t)}var dk=l5,u5=fk,c5=a5,f5=dk;function h5(t){return f5(t)?u5(t):c5(t)}var iv=h5,d5=nv,p5=iv;function v5(t,e){return t&&d5(e,p5(e),t)}var m5=v5;function g5(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var y5=g5,_5=sa,x5=Ob,b5=y5,S5=Object.prototype,w5=S5.hasOwnProperty;function E5(t){if(!_5(t))return b5(t);var e=x5(t),r=[];for(var n in t)n=="constructor"&&(e||!w5.call(t,n))||r.push(n);return r}var T5=E5,A5=fk,C5=T5,P5=dk;function O5(t){return P5(t)?A5(t,!0):C5(t)}var Rb=O5,R5=nv,I5=Rb;function k5(t,e){return t&&R5(e,I5(e),t)}var M5=k5,np={exports:{}};np.exports;(function(t,e){var r=Ei,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(l,c){if(c)return l.slice();var f=l.length,h=s?s(f):new l.constructor(f);return l.copy(h),h}t.exports=u})(np,np.exports);var F5=np.exports;function N5(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r(t[t.say=0]="say",t[t.changeBg=1]="changeBg",t[t.changeFigure=2]="changeFigure",t[t.bgm=3]="bgm",t[t.video=4]="video",t[t.pixi=5]="pixi",t[t.pixiInit=6]="pixiInit",t[t.intro=7]="intro",t[t.miniAvatar=8]="miniAvatar",t[t.changeScene=9]="changeScene",t[t.choose=10]="choose",t[t.end=11]="end",t[t.setComplexAnimation=12]="setComplexAnimation",t[t.setFilter=13]="setFilter",t[t.label=14]="label",t[t.jumpLabel=15]="jumpLabel",t[t.chooseLabel=16]="chooseLabel",t[t.setVar=17]="setVar",t[t.if=18]="if",t[t.callScene=19]="callScene",t[t.showVars=20]="showVars",t[t.unlockCg=21]="unlockCg",t[t.unlockBgm=22]="unlockBgm",t[t.filmMode=23]="filmMode",t[t.setTextbox=24]="setTextbox",t[t.setAnimation=25]="setAnimation",t[t.playEffect=26]="playEffect",t[t.setTempAnimation=27]="setTempAnimation",t[t.comment=28]="comment",t[t.setTransform=29]="setTransform",t[t.setTransition=30]="setTransition",t[t.getUserInput=31]="getUserInput",t[t.applyStyle=32]="applyStyle",t))(Qe||{});const dh={BGMAIN:"bg-main",FIG_C:"fig-center",FIG_L:"fig-left",FIG_R:"fig-right"},Ck={oldBgName:"",bgName:"",figName:"",figNameLeft:"",figNameRight:"",freeFigure:[],figureAssociatedAnimation:[],showText:"",showTextSize:-1,showName:"",command:"",choose:[],vocal:"",playVocal:"",vocalVolume:100,bgm:{src:"",enter:0,volume:100},uiSe:"",miniAvatar:"",GameVar:{},effects:[],bgFilter:"",bgTransform:"",PerformList:[],currentDialogKey:"initial",live2dMotion:[],live2dExpression:[],currentConcatDialogPrev:"",enableFilm:"",isDisableTextbox:!1,replacedUIlable:{},figureMetaData:{}},Mb=Qp({name:"stage",initialState:Jt(Ck),reducers:{resetStageState:(t,e)=>{Object.assign(t,e.payload)},setStage:(t,e)=>{t[e.payload.key]=e.payload.value},setStageVar:(t,e)=>{t.GameVar[e.payload.key]=e.payload.value},updateEffect:(t,e)=>{const{target:r,transform:n}=e.payload;if(![dh.BGMAIN,dh.FIG_C,dh.FIG_L,dh.FIG_R,...t.freeFigure.map(o=>o.key)].includes(r))return;const a=t.effects.findIndex(o=>o.target===r);a>=0?t.effects[a].transform=n:t.effects.push({target:r,transform:n})},removeEffectByTargetId:(t,e)=>{const r=t.effects.findIndex(n=>n.target===e.payload);r>=0&&t.effects.splice(r,1)},addPerform:(t,e)=>{if(t.PerformList.findIndex(n=>n.id===e.payload.id)>-1){const n=e.payload.id;for(let i=0;i{for(let r=0;r{for(let r=0;r{const r=t.freeFigure,n=e.payload,i=r.findIndex(a=>a.key===n.key);if(i>=0)if(n.name===""){r.splice(i,1);const a=t.figureAssociatedAnimation.findIndex(o=>o.targetId===n.key);t.figureAssociatedAnimation.splice(a,1)}else r[i].basePosition=n.basePosition,r[i].name=n.name;else n.name!==""&&r.push(n)},setLive2dMotion:(t,e)=>{const{target:r,motion:n,overrideBounds:i}=e.payload,a=t.live2dMotion.findIndex(o=>o.target===r);a<0?t.live2dMotion.push({target:r,motion:n,overrideBounds:i}):(t.live2dMotion[a].motion=n,t.live2dMotion[a].overrideBounds=i)},setLive2dExpression:(t,e)=>{const{target:r,expression:n}=e.payload,i=t.live2dExpression.findIndex(a=>a.target===r);i<0?t.live2dExpression.push({target:r,expression:n}):t.live2dExpression[i].expression=n},replaceUIlable:(t,e)=>{t.replacedUIlable[e.payload[0]]=e.payload[1]},setFigureMetaData:(t,e)=>{e.payload[3]?t.figureMetaData[e.payload[0]]&&delete t.figureMetaData[e.payload[0]]:(console.log("yeah"),t.figureMetaData[e.payload[0]]||(t.figureMetaData[e.payload[0]]={}),t.figureMetaData[e.payload[0]][e.payload[1]]=e.payload[2])}}}),{resetStageState:ov,setStage:Ge,setStageVar:Pk}=Mb.actions,Tr=Mb.actions,rz=Mb.reducer;function ph(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ok={exports:{}};/*! localForage -- Offline Storage, Improved Version 1.10.0 https://localforage.github.io/localForage @@ -81,11 +81,11 @@ Add a component higher in the tree to provide a loading * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var sS=Symbol.for("react.element"),lS=Symbol.for("react.portal"),Lv=Symbol.for("react.fragment"),Dv=Symbol.for("react.strict_mode"),Bv=Symbol.for("react.profiler"),jv=Symbol.for("react.provider"),Uv=Symbol.for("react.context"),Lre=Symbol.for("react.server_context"),$v=Symbol.for("react.forward_ref"),Vv=Symbol.for("react.suspense"),Gv=Symbol.for("react.suspense_list"),Xv=Symbol.for("react.memo"),zv=Symbol.for("react.lazy"),Dre=Symbol.for("react.offscreen"),gF;gF=Symbol.for("react.module.reference");function ai(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case sS:switch(t=t.type,t){case Lv:case Bv:case Dv:case Vv:case Gv:return t;default:switch(t=t&&t.$$typeof,t){case Lre:case Uv:case $v:case zv:case Xv:case jv:return t;default:return e}}case lS:return e}}}gt.ContextConsumer=Uv;gt.ContextProvider=jv;gt.Element=sS;gt.ForwardRef=$v;gt.Fragment=Lv;gt.Lazy=zv;gt.Memo=Xv;gt.Portal=lS;gt.Profiler=Bv;gt.StrictMode=Dv;gt.Suspense=Vv;gt.SuspenseList=Gv;gt.isAsyncMode=function(){return!1};gt.isConcurrentMode=function(){return!1};gt.isContextConsumer=function(t){return ai(t)===Uv};gt.isContextProvider=function(t){return ai(t)===jv};gt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===sS};gt.isForwardRef=function(t){return ai(t)===$v};gt.isFragment=function(t){return ai(t)===Lv};gt.isLazy=function(t){return ai(t)===zv};gt.isMemo=function(t){return ai(t)===Xv};gt.isPortal=function(t){return ai(t)===lS};gt.isProfiler=function(t){return ai(t)===Bv};gt.isStrictMode=function(t){return ai(t)===Dv};gt.isSuspense=function(t){return ai(t)===Vv};gt.isSuspenseList=function(t){return ai(t)===Gv};gt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Lv||t===Bv||t===Dv||t===Vv||t===Gv||t===Dre||typeof t=="object"&&t!==null&&(t.$$typeof===zv||t.$$typeof===Xv||t.$$typeof===jv||t.$$typeof===Uv||t.$$typeof===$v||t.$$typeof===gF||t.getModuleId!==void 0)};gt.typeOf=ai;function Bre(){const t=bre();let e=null,r=null;return{clear(){e=null,r=null},notify(){t(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],i=e;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0,a=r={callback:n,next:null,prev:r};return a.prev?a.prev.next=a:e=a,function(){!i||e===null||(i=!1,a.next?a.next.prev=a.prev:r=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}const _P={notify(){},get:()=>[]};function jre(t,e){let r,n=_P,i=0,a=!1;function o(v){c();const g=n.subscribe(v);let m=!1;return()=>{m||(m=!0,g(),f())}}function s(){n.notify()}function u(){p.onStateChange&&p.onStateChange()}function l(){return a}function c(){i++,r||(r=e?e.addNestedSub(u):t.subscribe(u),n=Bre())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=_P)}function h(){a||(a=!0,c())}function d(){a&&(a=!1,f())}const p={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:d,getListeners:()=>n};return p}const Ure=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$re=Ure?ne.useLayoutEffect:ne.useEffect;function yF({store:t,context:e,children:r,serverState:n,stabilityCheck:i="once",noopCheck:a="once"}){const o=ne.useMemo(()=>{const l=jre(t);return{store:t,subscription:l,getServerState:n?()=>n:void 0,stabilityCheck:i,noopCheck:a}},[t,n,i,a]),s=ne.useMemo(()=>t.getState(),[t]);$re(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==t.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,s]);const u=e||Eo;return ne.createElement(u.Provider,{value:o},r)}function _F(t=Eo){const e=t===Eo?fF:nS(t);return function(){const{store:n}=e();return n}}const Vre=_F();function Gre(t=Eo){const e=t===Eo?Vre:_F(t);return function(){return e().dispatch}}const Lr=Gre();Ere(yre.useSyncExternalStoreWithSelector);xre(XI.unstable_batchedUpdates);const _n=()=>{const t=Lr();return{playSeEnter:()=>{t(Ge({key:"uiSe",value:iF}))},playSeClick:()=>{t(Ge({key:"uiSe",value:aF}))},playSePageChange:()=>{t(Ge({key:"uiSe",value:Zte}))},playSeDialogOpen:()=>{t(Ge({key:"uiSe",value:Jte}))},playSeSwitch:()=>{t(Ge({key:"uiSe",value:Qte}))}}},uS=()=>({playSeEnter:()=>{te.dispatch(Ge({key:"uiSe",value:iF}))},playSeClick:()=>{te.dispatch(Ge({key:"uiSe",value:aF}))}}),Xre=[{reg:/\\\\/g,val:"\\"},{reg:/\\\|/g,val:"|"},{reg:/\\:/g,val:":"},{reg:/\\,/g,val:","},{reg:/\\;/g,val:";"},{reg:/\\./g,val:"."}],cS=t=>{let e=t;for(let r of Xre)e=e.replaceAll(r.reg,r.val);return e};function zre(t){return Kv.parseScssToWebgalStyleObj(t)}function wi(t){const[e,r]=ne.useState(t);return{_value:e,set:function(n){this._value=n,r(n)},get value(){return this._value},set value(n){this.set(n)}}}function Wre(t){if(t.sheet)return t.sheet;for(var e=0;e0?Gr(hu,--Pn):0,jl--,sr===10&&(jl=1,Yv--),sr}function Bn(){return sr=Pn2||Kc(sr)>3?"":" "}function ane(t,e){for(;--e&&Bn()&&!(sr<48||sr>102||sr>57&&sr<65||sr>70&&sr<97););return Xf(t,pd()+(e<6&&Ji()==32&&Bn()==32))}function l_(t){for(;Bn();)switch(sr){case t:return Pn;case 34:case 39:t!==34&&t!==39&&l_(sr);break;case 40:t===41&&l_(t);break;case 92:Bn();break}return Pn}function one(t,e){for(;Bn()&&t+sr!==47+10;)if(t+sr===42+42&&Ji()===47)break;return"/*"+Xf(e,Pn-1)+"*"+Wv(t===47?t:Bn())}function sne(t){for(;!Kc(Ji());)Bn();return Xf(t,Pn)}function lne(t){return TF(md("",null,null,null,[""],t=EF(t),0,[0],t))}function md(t,e,r,n,i,a,o,s,u){for(var l=0,c=0,f=o,h=0,d=0,p=0,v=1,g=1,m=1,y=0,_="",x=i,b=a,S=n,w=_;g;)switch(p=y,y=Bn()){case 40:if(p!=108&&Gr(w,f-1)==58){s_(w+=ot(vd(y),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:w+=vd(y);break;case 9:case 10:case 13:case 32:w+=ine(p);break;case 92:w+=ane(pd()-1,7);continue;case 47:switch(Ji()){case 42:case 47:yh(une(one(Bn(),pd()),e,r),u);break;default:w+="/"}break;case 123*v:s[l++]=Ui(w)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:m==-1&&(w=ot(w,/\f/g,"")),d>0&&Ui(w)-f&&yh(d>32?bP(w+";",n,r,f-1):bP(ot(w," ","")+";",n,r,f-2),u);break;case 59:w+=";";default:if(yh(S=xP(w,e,r,l,c,i,s,_,x=[],b=[],f),a),y===123)if(c===0)md(w,e,S,S,x,a,f,s,b);else switch(h===99&&Gr(w,3)===110?100:h){case 100:case 108:case 109:case 115:md(t,S,S,n&&yh(xP(t,S,S,0,0,i,s,_,i,x=[],f),b),i,b,f,s,n?x:b);break;default:md(w,S,S,S,[""],b,0,s,b)}}l=c=d=0,v=m=1,_=w="",f=o;break;case 58:f=1+Ui(w),d=p;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&nne()==125)continue}switch(w+=Wv(y),y*v){case 38:m=c>0?1:(w+="\f",-1);break;case 44:s[l++]=(Ui(w)-1)*m,m=1;break;case 64:Ji()===45&&(w+=vd(Bn())),h=Ji(),c=f=Ui(_=w+=sne(pd())),y++;break;case 45:p===45&&Ui(w)==2&&(v=0)}}return a}function xP(t,e,r,n,i,a,o,s,u,l,c){for(var f=i-1,h=i===0?a:[""],d=dS(h),p=0,v=0,g=0;p0?h[m]+" "+y:ot(y,/&\f/g,h[m])))&&(u[g++]=_);return Hv(t,e,r,i===0?fS:s,u,l,c)}function une(t,e,r){return Hv(t,e,r,xF,Wv(rne()),qc(t,2,-2),0)}function bP(t,e,r,n){return Hv(t,e,r,hS,qc(t,0,n),qc(t,n+1,-1),n)}function El(t,e){for(var r="",n=dS(t),i=0;i6)switch(Gr(t,e+1)){case 109:if(Gr(t,e+4)!==45)break;case 102:return ot(t,/(.+:)(.+)-([^]+)/,"$1"+at+"$2-$3$1"+up+(Gr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~s_(t,"stretch")?AF(ot(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Gr(t,e+1)!==115)break;case 6444:switch(Gr(t,Ui(t)-3-(~s_(t,"!important")&&10))){case 107:return ot(t,":",":"+at)+t;case 101:return ot(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+at+(Gr(t,14)===45?"inline-":"")+"box$3$1"+at+"$2$3$1"+Yr+"$2box$3")+t}break;case 5936:switch(Gr(t,e+11)){case 114:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return at+t+Yr+t+t}return t}var _ne=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case hS:e.return=AF(e.value,e.length);break;case bF:return El([Uu(e,{value:ot(e.value,"@","@"+at)})],i);case fS:if(e.length)return tne(e.props,function(a){switch(ene(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return El([Uu(e,{props:[ot(a,/:(read-\w+)/,":"+up+"$1")]})],i);case"::placeholder":return El([Uu(e,{props:[ot(a,/:(plac\w+)/,":"+at+"input-$1")]}),Uu(e,{props:[ot(a,/:(plac\w+)/,":"+up+"$1")]}),Uu(e,{props:[ot(a,/:(plac\w+)/,Yr+"input-$1")]})],i)}return""})}},xne=[_ne],bne=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var g=v.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=e.stylisPlugins||xne,a={},o,s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var g=v.getAttribute("data-emotion").split(" "),m=1;m=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var wne={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ene=/[A-Z]|^ms/g,Tne=/_EMO_([^_]+?)_([^]*?)_EMO_/g,CF=function(e){return e.charCodeAt(1)===45},wP=function(e){return e!=null&&typeof e!="boolean"},Yg=dne(function(t){return CF(t)?t:t.replace(Ene,"-$&").toLowerCase()}),EP=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Tne,function(n,i,a){return $i={name:i,styles:a,next:$i},i})}return wne[e]!==1&&!CF(e)&&typeof r=="number"&&r!==0?r+"px":r};function Zc(t,e,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return $i={name:r.name,styles:r.styles,next:$i},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)$i={name:n.name,styles:n.styles,next:$i},n=n.next;var i=r.styles+";";return i}return Ane(t,e,r)}case"function":{if(t!==void 0){var a=$i,o=r(t);return $i=a,Zc(t,e,o)}break}}if(e==null)return r;var s=e[r];return s!==void 0?s:r}function Ane(t,e,r){var n="";if(Array.isArray(r))for(var i=0;ia.stage.replacedUIlable),n=(a,o)=>{var u;const s=(r==null?void 0:r[a])??a;if(Object.keys(e.value.classNameStyles).includes(s)){const l=ac(((u=e.value.classNameStyles)==null?void 0:u[s])??"");return`${o} ${l}`}return o},i=async()=>{ge.debug("更新 Scss 文件",t);const o=(await Wc.get(`game/template/${t}`)).data;e.set(zre(o))};return ne.useEffect(()=>{i()},[]),ne.useEffect(()=>{kne(e.value.others)},[e.value.others]),Mne(i),n}function Mne(t){const e=()=>{t()};ne.useEffect(()=>(L.events.styleUpdate.on(e),()=>L.events.styleUpdate.off(e)),[])}class vS{constructor(e,r){Ae(this,"text");Ae(this,"jump");Ae(this,"jumpToScene");Ae(this,"showCondition");Ae(this,"enableCondition");this.text=cS(e),this.jump=r,this.jumpToScene=r.match(new RegExp("(?"),n=r.length>1?r[0]:null,a=(r.length>1?r[1]:r[0]).split(new RegExp("(?{const r=t.content.split(new RegExp("(?vS.parse(n));return ea.render(C.jsx(yF,{store:te,children:C.jsx(Nne,{chooseOptions:r})}),document.getElementById("chooseContainer")),{performName:"choose",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{ea.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}};function Nne(t){const r=te.getState().userData.optionData.textboxFont===Zi.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:n,playSeClick:i}=uS(),a=pS("Stage/Choose/choose.scss"),o=s=>s.filter((u,l)=>d_(u.showCondition)).map((u,l)=>{const c=d_(u.enableCondition),f=c?a("Choose_item",gh.Choose_item):a("Choose_item_disabled",gh.Choose_item_disabled),h=c?()=>{i(),u.jumpToScene?rF(u.jump,u.text):nF(u.jump),L.gameplay.performController.unmountPerform("choose")}:()=>{};return C.jsx("div",{className:a("Choose_item_outer",gh.Choose_item_outer),children:C.jsx("div",{className:f,style:{fontFamily:r},onClick:h,onMouseEnter:n,children:u.text})},u.jump+l)});return C.jsx("div",{className:a("Choose_Main",gh.Choose_Main),children:o(t.chooseOptions)})}const Lne=t=>(ge.debug(`脚本内注释${t.content}`),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Dne=t=>(t.content!==""&&t.content!=="none"?te.dispatch(Ge({key:"enableFilm",value:t.content})):te.dispatch(Ge({key:"enableFilm",value:""})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Bne="_Choose_Main_4xkm5_1",jne="_Choose_item_4xkm5_13",Une="_glabalDialog_container_inner_4xkm5_28",$ne="_glabalDialog_container_4xkm5_28",Vne="_title_4xkm5_47",Gne="_button_4xkm5_59",Vs={Choose_Main:Bne,Choose_item:jne,glabalDialog_container_inner:Une,glabalDialog_container:$ne,title:Vne,button:Gne},Xne=t=>{const e=t.content.toString().trim(),r=He(t,"title"),n=(r===0?"Please Input":r)??"Please Input",i=He(t,"buttonText"),a=(i===0?"OK":i)??"OK",s=te.getState().userData.optionData.textboxFont===Zi.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:u,playSeClick:l}=uS(),c=C.jsx("div",{style:{fontFamily:s},className:Vs.glabalDialog_container,children:C.jsxs("div",{className:Vs.glabalDialog_container_inner,children:[C.jsx("div",{className:Vs.title,children:n}),C.jsx("input",{id:"user-input",className:Vs.Choose_item}),C.jsx("div",{onMouseEnter:u,onClick:()=>{const f=document.getElementById("user-input");f&&te.dispatch(Pk({key:e,value:((f==null?void 0:f.value)??"")===""?" ":(f==null?void 0:f.value)??""})),l(),L.gameplay.performController.unmountPerform("userInput"),tn()},className:Vs.button,children:a})]})});return ea.render(C.jsx("div",{className:Vs.Choose_Main,children:c}),document.getElementById("chooseContainer")),{performName:"userInput",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{ea.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}},zne="_FullScreenPerform_main_7er8a_2",Wne="_FullScreenPerform_element_7er8a_9",Yne="_fullScreen_video_7er8a_17",Hne="_fadeIn_7er8a_74",qne="_intro_showSoftly_7er8a_1",Kne="_slideIn_7er8a_80",Zne="_typingEffect_7er8a_86",Qne="_typing_7er8a_86",Jne="_blinkCursor_7er8a_1",eie="_pixelateEffect_7er8a_95",tie="_pixelateAnimation_7er8a_1",rie="_revealAnimation_7er8a_101",nie="_videoContainer_7er8a_115",Bi={FullScreenPerform_main:zne,FullScreenPerform_element:Wne,fullScreen_video:Yne,fadeIn:Hne,intro_showSoftly:qne,slideIn:Kne,typingEffect:Zne,typing:Qne,blinkCursor:Jne,pixelateEffect:eie,pixelateAnimation:tie,revealAnimation:rie,videoContainer:nie},iie=t=>{const e=`introPerform${Math.random().toString()}`;let r,n="rgba(0, 0, 0, 1)",i="rgba(255, 255, 255, 1)";const a=(b,S=0)=>{switch(b){case"fadeIn":return Bi.fadeIn;case"slideIn":return Bi.slideIn;case"typingEffect":return`${Bi.typingEffect} ${S}`;case"pixelateEffect":return Bi.pixelateEffect;case"revealAnimation":return Bi.revealAnimation;default:return Bi.fadeIn}};let o=Bi.fadeIn,s=1500,u=!1;for(const b of t.args){if(b.key==="backgroundColor"&&(n=b.value||"rgba(0, 0, 0, 1)"),b.key==="fontColor"&&(i=b.value||"rgba(255, 255, 255, 1)"),b.key==="fontSize")switch(b.value){case"small":r="280%";break;case"medium":r="350%";break;case"large":r="420%";break}if(b.key==="animation"&&(o=a(b.value)),b.key==="delayTime"){const S=parseInt(b.value.toString(),10);s=isNaN(S)?s:S}b.key==="hold"&&b.value===!0&&(u=!0)}const l={background:n,color:i,fontSize:r||"350%",width:"100%",height:"100%"},c=t.content.split(new RegExp("(?cS(b));let h=1e3+s*c.length;const d=u?1e3*60*60*24:1e3+s*c.length;let p=!0,v=setTimeout(()=>{p=!1},h),g=setTimeout(()=>{});const m=()=>{const b=document.getElementById("introContainer");if(h-=s,clearTimeout(v),v=setTimeout(()=>{p=!1},h),b){const S=b.childNodes[0].childNodes[0].childNodes,w=S.length;S.forEach((E,T)=>{const A=Number(E.style.animationDelay.split("ms")[0]);A>0&&(E.style.animationDelay=`${A-s}ms`),T===w-1&&(A===0?(clearTimeout(g),L.gameplay.performController.unmountPerform(e)):(clearTimeout(g),u||(g=setTimeout(()=>{L.gameplay.performController.unmountPerform(e)},h))))})}};L.events.userInteractNext.on(m);const y=c.map((b,S)=>C.jsxs("div",{style:{animationDelay:`${s*S}ms`},className:o,children:[b,b===""?" ":""]},"introtext"+S+Math.random().toString())),_=C.jsx("div",{style:l,children:C.jsx("div",{style:{padding:"3em 4em 3em 4em"},children:y})});ea.render(_,document.getElementById("introContainer"));const x=document.getElementById("introContainer");return x&&(x.style.display="block"),{performName:e,duration:d,isHoldOn:!1,stopFunction:()=>{const b=document.getElementById("introContainer");b&&(b.style.display="none"),L.events.userInteractNext.off(m)},blockingNext:()=>p,blockingAuto:()=>p,stopTimeout:void 0,goNextWhenOver:!0}},aie=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),oie=t=>{let e=t.content;return(t.content==="none"||t.content==="")&&(e=""),te.dispatch(Ge({key:"miniAvatar",value:e})),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},sie="modulepreload",lie=function(t,e){return new URL(t,e).href},PP={},uie=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=lie(a,n),a in PP)return;PP[a]=!0;const o=a.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(!!n)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===a&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":sie,o||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},RF=new Map;function cie(t){return t?typeof t=="string"?t:t():null}function IF(t){const e=cie(t);return e||(ge.error("Get name of perform failed. There no name of the perform."),"")}function _we(t,e){if(!e||typeof e!="function")throw new Error(`"${t}" is not a callback.`);RF.set(IF(t),e)}function fie(t,e=[]){const r=RF.get(IF(t));if(!r||!(r instanceof Function))throw ge.error(`Can't call the perform named "${t}"`),new Error(`"${t}" don't have the pixiPerform callback.`);return r(...e)}uie(()=>import("./initRegister-2c254553.js"),[],import.meta.url);const hie=t=>{const e="PixiPerform"+t.content;L.gameplay.performController.performList.forEach(a=>{if(a.performName===e)return{performName:"none",duration:0,isOver:!1,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}});const r=fie(t.content),{container:n,tickerKey:i}=r;return{performName:e,duration:0,isHoldOn:!0,stopFunction:()=>{var a,o;ge.warn("现在正在卸载pixi演出"),n.destroy({texture:!0,baseTexture:!0}),(a=L.gameplay.pixiStage)==null||a.effectsContainer.removeChild(n),(o=L.gameplay.pixiStage)==null||o.removeAnimation(i)},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},die=t=>{var a;ge.debug("play SE");let e="effect-sound";L.gameplay.performController.unmountPerform(e,!0);let r=t.content,n=!1;He(t,"id")&&(e=`effect-sound-${((a=He(t,"id"))==null?void 0:a.toString())??""}`,L.gameplay.performController.unmountPerform(e,!0),n=!0);let i=!1;return{performName:"none",blockingAuto(){return!1},blockingNext(){return!1},isHoldOn:!1,stopFunction(){},stopTimeout:void 0,duration:1e3*60*60,arrangePerformPromise:new Promise(o=>{setTimeout(()=>{var p;const s=He(t,"volume");let u=document.createElement("audio");u.src=r,n&&(u.loop=!0);const l=te.getState().userData,c=l.optionData.volumeMain,f=typeof s=="number"&&s>=0&&s<=100?s:100,h=c*.01*(((p=l.optionData)==null?void 0:p.seVolume)??100)*.01*f*.01;u.volume=h,u.currentTime=0;const d={performName:e,duration:1e3*60*60,isHoldOn:n,skipNextCollect:!0,stopFunction:()=>{u.pause()},blockingNext:()=>!1,blockingAuto:()=>n?!1:!i,stopTimeout:void 0};o(d),u==null||u.play(),u.onended=()=>{for(const v of L.gameplay.performController.performList)v.performName===e&&(i=!0,v.stopFunction(),L.gameplay.performController.unmountPerform(v.performName))}},1)})}},pie=t=>{const e=te.getState().userData,r=e.optionData.volumeMain,n=r*.01*e.optionData.vocalVolume*.01,i=r*.01*e.optionData.bgmVolume*.01,a=TS();let o=He(t,"skipOff"),s=!1;o&&(s=!0),ea.render(C.jsx("div",{className:Bi.videoContainer,children:C.jsx("video",{className:Bi.fullScreen_video,id:"playVideoElement",src:t.content,autoPlay:!0})}),document.getElementById("videoContainer"));let u=!1;return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>s,blockingAuto:()=>!0,stopTimeout:void 0,arrangePerformPromise:new Promise(l=>{setTimeout(()=>{let c=document.getElementById("playVideoElement");if(c!==null){c.currentTime=0,c.volume=i;const f=()=>{for(const y of L.gameplay.performController.performList)y.performName===a&&(u=!0,y.stopFunction(),L.gameplay.performController.unmountPerform(y.performName))},h=()=>{f()};L.events.fullscreenDbClick.on(h);const d={performName:a,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{L.events.fullscreenDbClick.off(h);const y=document.getElementById("currentBgm");y&&(y.volume=i.toString());const _=document.getElementById("currentVocal");y&&(_.volume=n.toString()),ea.render(C.jsx("div",{}),document.getElementById("videoContainer"))},blockingNext:()=>s,blockingAuto:()=>!u,stopTimeout:void 0,goNextWhenOver:!0};l(d);const p=0,v=0,g=document.getElementById("currentBgm");g&&(g.volume=v.toString());const m=document.getElementById("currentVocal");g&&(m.volume=p.toString()),c==null||c.play(),c.onended=()=>{f()}}},1)})}},vie=t=>{var o;te.getState().stage.currentDialogKey;const e=t.content,r=En(e),n=(((o=He(t,"target"))==null?void 0:o.toString())??"default_id").toString(),i=`${n}-${e}-${r}`;let a;return setTimeout(()=>{var u,l;(u=L.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n);const s=lp(e,n,r);s&&(ge.debug(`动画${e}作用在${n}`,r),(l=L.gameplay.pixiStage)==null||l.registerAnimation(s,i,n))},0),a=()=>{setTimeout(()=>{var s;te.getState().stage.currentDialogKey,(s=L.gameplay.pixiStage)==null||s.removeAnimationWithSetEffects(i)},0)},{performName:i,duration:r,isHoldOn:!1,stopFunction:a,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function mie(t,e){const r=L.gameplay.pixiStage.getStageObjByKey(t);function n(){r&&(r.pixiContainer.alpha=0,r.pixiContainer.blur=0)}function i(){r&&(r.pixiContainer.alpha=1,r.pixiContainer.blur=5)}function a(o){if(r){const s=r.pixiContainer,u=L.gameplay.pixiStage.frameDuration,l=e/u*o,c=1/l,f=5/l;s.alpha<1&&(s.alpha+=c),s.blur<5&&(s.blur+=f)}}return{setStartState:n,setEndState:i,tickerFunc:a}}const gie=[{name:"universalSoftIn",animationGenerateFunc:SM},{name:"universalSoftOff",animationGenerateFunc:wM},{name:"testblur",animationGenerateFunc:mie}],yie=t=>{var s,u,l;te.getState().stage.currentDialogKey;const e=t.content,r=He(t,"duration")??0,n=((s=He(t,"target"))==null?void 0:s.toString())??"0",i=`${n}-${e}-${r}`,a=_ie(e);let o=()=>{};if(a){ge.debug(`动画${e}作用在${n}`,r);const c=a(n,r);(u=L.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n),(l=L.gameplay.pixiStage)==null||l.registerAnimation(c,i,n),o=()=>{var f;te.getState().stage.currentDialogKey,(f=L.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(i)}}return{performName:i,duration:r,isHoldOn:!1,stopFunction:o,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function _ie(t){const e=gie.find(r=>r.name===t);return ge.debug("装载动画",e),e?e.animationGenerateFunc:null}const xie=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),bie=t=>{var l;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;try{n=JSON.parse(r)}catch{n=[]}const i={name:e,effects:n};L.animationManager.addAnimation(i);const a=En(e),o=((l=He(t,"target"))==null?void 0:l.toString())??"0",s=`${o}-${e}-${a}`;let u=()=>{};return setTimeout(()=>{var f,h;(f=L.gameplay.pixiStage)==null||f.stopPresetAnimationOnTarget(o);const c=lp(e,o,a);c&&(ge.debug(`动画${e}作用在${o}`,a),(h=L.gameplay.pixiStage)==null||h.registerAnimation(c,s,o))},0),u=()=>{setTimeout(()=>{var c;te.getState().stage.currentDialogKey,(c=L.gameplay.pixiStage)==null||c.removeAnimationWithSetEffects(s)},0)},{performName:s,duration:a,isHoldOn:!1,stopFunction:u,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Sie(t){return t.content==="hide"?te.dispatch(Ge({key:"isDisableTextbox",value:!0})):te.dispatch(Ge({key:"isDisableTextbox",value:!1})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}}const wie=t=>{var c;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;const i=He(t,"duration"),a=((c=He(t,"target"))==null?void 0:c.toString())??"0";try{const f=JSON.parse(r);n=Yc(a,f,i)}catch{n=[]}const o={name:e,effects:n};L.animationManager.addAnimation(o);const s=Tie(e),u=`${a}-${e}-${s}`;let l=()=>{};return setTimeout(()=>{var h,d;(h=L.gameplay.pixiStage)==null||h.stopPresetAnimationOnTarget(a);const f=Eie(e,a,s);f&&(ge.debug(`动画${e}作用在${a}`,s),(d=L.gameplay.pixiStage)==null||d.registerAnimation(f,u,a))},0),l=()=>{setTimeout(()=>{var f;te.getState().stage.currentDialogKey,(f=L.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(u)},0)},{performName:u,duration:s,isHoldOn:!1,stopFunction:l,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Eie(t,e,r){const n=L.animationManager.getAnimations().find(i=>i.name===t);if(n){const i=n.effects.map(a=>{const o=Jt({...Kb,duration:0});return Object.assign(o,a),o.duration=a.duration,o});return ge.debug("装载自定义动画",i),tF(i,e,r)}return null}function Tie(t){const e=L.animationManager.getAnimations().find(r=>r.name===t);if(e){let r=0;return e.effects.forEach(n=>{r+=n.duration}),r}return 0}const Aie=t=>{let e="0";for(const r of t.args)r.key==="target"&&(e=r.value.toString());return He(t,"enter")&&L.animationManager.nextEnterAnimationName.set(e,He(t,"enter").toString()),He(t,"exit")&&L.animationManager.nextExitAnimationName.set(e+"-off",He(t,"exit").toString()),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},Cie=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),ge.info(`解锁BGM:${r},路径:${e},所属系列:${n}`),te.dispatch(Wk({name:r,url:e,series:n}));const i=te.getState().userData;return Os.setItem(L.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},Pie=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),ge.info(`解锁CG:${r},路径:${e},所属系列:${n}`),te.dispatch(zk({name:r,url:e,series:n}));const i=te.getState().userData;return Os.setItem(L.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},mS=(t,e=!0)=>{t&&L.backlogManager.makeBacklogEmpty(),e&&L.sceneManager.resetScene(),L.gameplay.performController.removeAllPerform(),L.gameplay.resetGamePlay();const r=Jt(Ck),n=te.getState().stage.GameVar;te.dispatch(ov(r)),e||te.dispatch(Ge({key:"GameVar",value:n}))},Oie={saveData:[],quickSaveData:null},kF=Qp({name:"saveData",initialState:Jt(Oie),reducers:{setFastSave:(t,e)=>{t.quickSaveData=e.payload},resetFastSave:t=>{t.quickSaveData=null},resetSaves:t=>{t.quickSaveData=null,t.saveData=[]},saveGame:(t,e)=>{t.saveData[e.payload.index]=e.payload.saveData},replaceSaveGame:(t,e)=>{t.saveData=e.payload}}}),Oa=kF.actions,Rie=kF.reducer,Iie=t=>{mS(!0);const e=te.dispatch,r=Nn("start.txt",Fn.scene);return setTimeout(()=>{L.sceneManager.resetScene()},5),e(Oa.resetFastSave()),hp(),ua(r).then(n=>{L.sceneManager.sceneData.currentScene=ca(n,"start.txt",r)}),e(rt({component:"showTitle",visibility:!0})),AS(te.getState().GUI.titleBgm),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},kie=t=>(nF(t.content),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Mie=t=>(L.gameplay.performController.performList.forEach(e=>{if(e.performName.match(/PixiPerform/)){ge.warn("pixi 被脚本重新初始化",e.performName);for(let r=0;r{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),ut={audioContext:new AudioContext,source:null,analyser:void 0,dataArray:void 0,audioLevelInterval:setInterval(()=>{},0),blinkTimerID:setTimeout(()=>{},0),maxAudioLevel:0},Fie=t=>(ut.maxAudioLevel=Math.max(t,ut.maxAudioLevel),{OPEN_THRESHOLD:ut.maxAudioLevel*.75,HALF_OPEN_THRESHOLD:ut.maxAudioLevel*.5}),Nie=t=>{let e=!1;function r(){var n;e||t.animationEndTime&&Date.now()>t.animationEndTime||(e=!0,(n=L.gameplay.pixiStage)==null||n.performBlinkAnimation(t.key,t.animationItem,"closed",t.pos),ut.blinkTimerID=setTimeout(()=>{var a;(a=L.gameplay.pixiStage)==null||a.performBlinkAnimation(t.key,t.animationItem,"open",t.pos),e=!1;const i=Math.random()*300+3500;ut.blinkTimerID=setTimeout(r,i)},200))}r()},Lie=(t,e,r)=>{t.getByteFrequencyData(e);let n=0;for(let i=0;i{var h,d;const{audioLevel:e,OPEN_THRESHOLD:r,HALF_OPEN_THRESHOLD:n,currentMouthValue:i,lerpSpeed:a,key:o,animationItem:s,pos:u}=t;let l;e>r?l=1:e>n?l=.5:l=0;const c=i+(l-i)*a;(h=L.gameplay.pixiStage)==null||h.setModelMouthY(o,e);let f;c>.75?f="open":c>.25?f="half_open":f="closed",s!==void 0&&((d=L.gameplay.pixiStage)==null||d.performMouthSyncAnimation(o,s,f,u))};class Die{constructor(e){Ae(this,"subject");Ae(this,"result");Ae(this,"isEnd",!1);this.subject=e}with(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this}endsWith(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this.evaluate()}default(e){return this.isEnd||(this.result=e()),this.evaluate()}evaluate(){return this.result}}function zf(t){return new Die(t)}const Bie=t=>{ge.debug("play vocal");const e="vocal-play",r=He(t,"vocal"),n=He(t,"volume");let i;i=te.getState().stage;let a="",o="";const s=i.freeFigure,u=i.figureAssociatedAnimation;let l=0,c=0;const f=1;let h=document.getElementById("currentVocal");L.gameplay.performController.unmountPerform("vocal-play",!0),h!==null&&(h.currentTime=0,h.pause());for(const p of t.args)p.value===!0&&zf(p.key).with("left",()=>{a="left"}).with("right",()=>{a="right"}).endsWith("center",()=>{a="center"}),p.key==="figureId"&&(o=`${p.value.toString()}`);te.dispatch(Ge({key:"playVocal",value:r})),te.dispatch(Ge({key:"vocal",value:r}));let d=!1;return{arrangePerformPromise:new Promise(p=>{setTimeout(()=>{let v=document.getElementById("currentVocal");if(typeof n=="number"&&n>=0&&n<=100?te.dispatch(Ge({key:"vocalVolume",value:n})):te.dispatch(Ge({key:"vocalVolume",value:100})),v!==null){v.currentTime=0;const g={performName:e,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{clearInterval(ut.audioLevelInterval),v.pause(),o=o||`fig-${a}`;const y=u.find(_=>_.targetId===o);u_({audioLevel:0,OPEN_THRESHOLD:1,HALF_OPEN_THRESHOLD:1,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:y,pos:a}),clearTimeout(ut.blinkTimerID)},blockingNext:()=>!1,blockingAuto:()=>!d,skipNextCollect:!0,stopTimeout:void 0};L.gameplay.performController.arrangeNewPerform(g,t,!1),o=o||`fig-${a}`;const m=u.find(y=>y.targetId===o);if(m){const y=s.find(b=>b.key===o);if(y&&(a=y.basePosition),!ut.audioContext){let b;b=new AudioContext,ut.analyser=b.createAnalyser(),ut.analyser.fftSize=256,ut.dataArray=new Uint8Array(ut.analyser.frequencyBinCount)}ut.analyser||(ut.analyser=ut.audioContext.createAnalyser(),ut.analyser.fftSize=256),l=ut.analyser.frequencyBinCount,ut.dataArray=new Uint8Array(l);let _=document.getElementById("currentVocal");ut.source||(ut.source=ut.audioContext.createMediaElementSource(_),ut.source.connect(ut.analyser)),ut.analyser.connect(ut.audioContext.destination),ut.audioLevelInterval=setInterval(()=>{const b=Lie(ut.analyser,ut.dataArray,l),{OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w}=Fie(b);u_({audioLevel:b,OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:m,pos:a})},50);let x;x=Date.now()+1e4,Nie({key:o,animationItem:m,pos:a,animationEndTime:x}),setTimeout(()=>{clearTimeout(ut.blinkTimerID)},1e4)}v==null||v.play(),v.onended=()=>{for(const y of L.gameplay.performController.performList)y.performName===e&&(d=!0,y.stopFunction(),L.gameplay.performController.unmountPerform(y.performName))}}},1)})}};function gS(t){switch(t){case hn.slow:return 80;case hn.normal:return 35;case hn.fast:return 3}}function MF(t){switch(t){case hn.slow:return 800;case hn.normal:return 350;case hn.fast:return 200}}function FF(){const t=Ne(r=>r.userData.optionData.textboxFont);function e(){return zf(t).with(Zi.song,()=>'"思源宋体", serif').with(Zi.lxgw,()=>'"LXGW", serif').with(Zi.hei,()=>'"WebgalUI", serif').default(()=>'"WebgalUI", serif')}return e()}function c_(t){switch(t){case 0:return 155;case 1:return 205;case 2:return 230;default:return 205}}const jie="_TextBox_EventHandler_1jt23_2",Uie="_TextBox_Container_1jt23_10",$ie="_showSoftly_1jt23_1",Vie="_TextBox_main_1jt23_18",Gie="_TextBox_main_miniavatarOff_1jt23_39",Xie="_TextBox_Background_1jt23_43",zie="_TextBox_textElement_start_1jt23_56",Wie="_TextDelayShow_1jt23_1",Yie="_outer_1jt23_64",Hie="_inner_1jt23_78",qie="_zhanwei_1jt23_89",Kie="_TextBox_textElement_Settled_1jt23_97",Zie="_TextBox_showName_1jt23_104",Qie="_TextBox_ShowName_Background_1jt23_117",Jie="_miniAvatarContainer_1jt23_132",eae="_miniAvatarImg_1jt23_142",tae="_nameContainer_1jt23_150",rae="_outerName_1jt23_156",nae="_innerName_1jt23_167",iae="_text_1jt23_174",yt={TextBox_EventHandler:jie,TextBox_Container:Uie,showSoftly:$ie,TextBox_main:Vie,TextBox_main_miniavatarOff:Gie,TextBox_Background:Xie,TextBox_textElement_start:zie,TextDelayShow:Wie,outer:Yie,inner:Hie,zhanwei:qie,TextBox_textElement_Settled:Kie,TextBox_showName:Zie,TextBox_ShowName_Background:Qie,miniAvatarContainer:Jie,miniAvatarImg:eae,nameContainer:tae,outerName:rae,innerName:nae,text:iae};function NF(t){const{textArray:e,textDelay:r,currentConcatDialogPrev:n,currentDialogKey:i,isText:a,isSafari:o,isFirefox:s,fontSize:u,miniAvatar:l,isHasName:c,showName:f,font:h,textDuration:d,isUseStroke:p,textboxOpacity:v,textSizeState:g}=t,m=pS("Stage/TextBox/textbox.scss");ne.useEffect(()=>{function b(){[...document.querySelectorAll(".Textelement_start")].forEach(E=>{E.className=m("TextBox_textElement_Settled",yt.TextBox_textElement_Settled)})}return L.events.textSettle.on(b),()=>{L.events.textSettle.off(b)}},[]);let y=0;const _=f.map((b,S)=>{const w=b.map((E,T)=>{const A=E.reactNode;let O="",P="",k=!1;if(E.enhancedValue){k=!0;const j=E.enhancedValue;for(const z of j){const{key:J,value:Z}=z;switch(J){case"style":O=Z;break;case"tips":break;case"style-alltext":P=Z;break}}}const M=" "+ac(O,{label:"showname"}),B=" "+ac(P,{label:"showname"});return k?C.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:yt.zhanwei+B,children:[A,C.jsx("span",{className:m("outerName",yt.outerName)+M+B,children:A}),p&&C.jsx("span",{className:m("innerName",yt.innerName)+B,children:A})]})},T):C.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:yt.zhanwei+B,children:[A,C.jsx("span",{className:m("outerName",yt.outerName)+M+B,children:A}),p&&C.jsx("span",{className:m("innerName",yt.innerName)+B,children:A})]})},T)});return C.jsx("div",{style:{wordBreak:o||t.isFirefox?"break-all":void 0,display:o?"flex":void 0,flexWrap:o?"wrap":void 0},children:w},`text-line-${S}`)}),x=e.map((b,S)=>{const w=b.map((E,T)=>{const A=E.reactNode;let O="",P="";if(E.enhancedValue){const z=E.enhancedValue;for(const J of z){const{key:Z,value:$}=J;switch(Z){case"style":O=$;break;case"tips":break;case"style-alltext":P=$;break}}}let k=y*r;y++;let M=n.length;n!==""&&y>=M&&(k=k-M*r);const B=" "+ac(O),j=" "+ac(P);return y{const[t,e]=ne.useState(!0);ne.useEffect(()=>{const _=()=>{const x=cp.height,b=cp.width,S=window.innerHeight,w=window.innerWidth,E=S/x,T=w/b,A=w/x,O=S/b;[E,T,A,O].forEach(P=>{P<=.2?e(!1):e(!0)})};return window.addEventListener("resize",_),_(),()=>{window.removeEventListener("resize",_)}},[]);const r=Ne(_=>_.stage),n=Ne(_=>_.userData),i=gS(n.optionData.textSpeed),a=MF(n.optionData.textSpeed);let o=c_(n.optionData.textSize)+"%";const s=FF(),u=r.showText!==""||r.showName!=="";let l=n.optionData.textSize;u&&r.showTextSize!==-1&&(o=c_(r.showTextSize)+"%",l=r.showTextSize);const c=zf(l).with(ti.small,()=>3).with(ti.medium,()=>2).with(ti.large,()=>2).default(()=>2),f=gs(r.showText,c),h=r.showName!=="",d=gs(r.showName,c),p=r.currentConcatDialogPrev,v=r.currentDialogKey,g=r.miniAvatar,m=n.optionData.textboxOpacity,y=NF;return C.jsx(y,{textArray:f,isText:u,textDelay:i,showName:d,isHasName:h,currentConcatDialogPrev:p,fontSize:o,currentDialogKey:v,isSafari:oae,isFirefox:aae,miniAvatar:g,textDuration:a,font:s,textSizeState:l,lineLimit:c,isUseStroke:t,textboxOpacity:m})};function OP(t){return!!t.match(/[\u4e00-\u9fa5]|[\u0800-\u4e00]|[\uac00-\ud7ff]/)}function gs(t,e,r){return t.split(new RegExp("(?cS(o)).map(o=>uae(o)).map(o=>{const s=[];return o.forEach((u,l)=>{zf(u.type).with("SegmentType.String",()=>{const c=lae(u.value);s.push(...c.map(f=>({reactNode:f})))}).endsWith("SegmentType.Link",()=>{const c=u.value,f=C.jsx("span",{className:"__enhanced_text",children:C.jsxs("ruby",{children:[c.text,C.jsx("rt",{children:c.ruby})]},l+c.text)},c.text+`${l}`);s.push({reactNode:f,enhancedValue:c.values})})}),s}).slice(0,r?void 0:e)}function lae(t){if(!t)return[""];const e=[];let r="",n=OP(t[0]);const i=a=>/[!-\/:-@\[-`{-~\u2000-\u206F\u3000-\u303F\uff00-\uffef]/g.test(a);for(const a of t)if(a===" ")r&&(e.push(r),r=""),e.push(" "),n=!1;else if(OP(a)&&!i(a))!n&&r&&(e.push(r),r=""),e.push(a),n=!0;else{if(i(a)){r?(r+=a,e.push(r),r=""):e.length>0?e[e.length-1]+=a:e.push(a);continue}n&&r&&(e.push(r),r=""),r+=a,n=!1}return r&&e.push(r),e}function uae(t){const e=/(\[(.*?)\]\((.*?)\))|([^\[\]]+)/g,r=[];let n;for(;(n=e.exec(t))!==null;)if(n[1]){const i=n[2],a=n[3];let o=[],s="";if(a.match(/style=|tips=|ruby=|style-alltext=/)){o=cae(a);const u=o.find(l=>l.key==="ruby");u&&(s=u.value)}else s=a;r.push({type:"SegmentType.Link",value:{text:i,ruby:s,values:o}})}else{const i=n[0];r.push({type:"SegmentType.String",value:i})}return r.unshift({type:"SegmentType.String",value:""}),r}function cae(t){const e=[],r=/(\S+)=(.*?)(?=\s+\S+=|\s*$)/g;let n;for(;(n=r.exec(t))!==null;)e.push({key:n[1],value:n[2].replace(/~/g,":").trim()});return e}const fae=t=>{const e=te.getState().stage,r=te.getState().userData,n=te.dispatch;let i=Math.random().toString(),a=t.content;a&&(a=String(a).replace(/ /g," "));const o=He(t,"concat"),s=He(t,"notend"),u=He(t,"speaker"),l=He(t,"clear"),c=He(t,"vocal");o?(i=e.currentDialogKey,a=e.showText+a,n(Ge({key:"currentConcatDialogPrev",value:e.showText}))):n(Ge({key:"currentConcatDialogPrev",value:""})),n(Ge({key:"showText",value:a})),n(Ge({key:"vocal",value:""})),r.optionData.voiceInterruption===zc.no&&c===null||(n(Ge({key:"playVocal",value:""})),L.gameplay.performController.unmountPerform("vocal-play",!0)),n(Ge({key:"currentDialogKey",value:i}));const f=gS(r.optionData.textSpeed),d=gs(t.content,3).reduce((E,T)=>E+T.length,0),p=f*d;for(const E of t.args)if(E.key==="fontSize")switch(E.value){case"default":n(Ge({key:"showTextSize",value:-1}));break;case"small":n(Ge({key:"showTextSize",value:ti.small}));break;case"medium":n(Ge({key:"showTextSize",value:ti.medium}));break;case"large":n(Ge({key:"showTextSize",value:ti.large}));break}let v=e.showName;u!==null&&(v=u),l&&(v=""),n(Ge({key:"showName",value:v}));let g=null,m=0,y="",_="";for(const E of t.args)E.value===!0&&zf(E.key).with("left",()=>{y="left"}).with("right",()=>{y="right"}).endsWith("center",()=>{y="center"}),E.key==="figureId"&&(_=`${E.value.toString()}`);let x=80;const b=(E=!1)=>{let T=x+(Math.random()*60-30);Math.abs(T-x)<5&&(T=x+Math.sign(T-x)*5),x=Math.max(15,Math.min(T,100));const P=te.getState().stage.figureAssociatedAnimation.find(M=>M.targetId===_),k=_||`fig-${y}`;E&&(x=0),u_({audioLevel:x,OPEN_THRESHOLD:50,HALF_OPEN_THRESHOLD:25,currentMouthValue:0,lerpSpeed:1,key:k,animationItem:P,pos:y}),E||(g=setTimeout(b,50))};c?Bie(t):(_||y)&&(m=d*250,b());const S=TS();let w=750-r.optionData.textSpeed*250;return s&&(w=0),{performName:S,duration:p+w+m,isHoldOn:!1,stopFunction:()=>{L.events.textSettle.emit(),g&&(b(!0),clearTimeout(g))},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0,goNextWhenOver:s}};var yS={},Qc={document:{}},DF=Object.prototype.hasOwnProperty,BF=function(t){return qv(t)?t.toLowerCase():t},Ec=Array.isArray,hae=function(t){return qv(t)?t.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)|32)}):t};"I".toLowerCase()!=="i"&&(BF=hae);var dae,_S=Object.prototype.toString,jF=Object.getPrototypeOf,qg=XF("ng");Qc.angular||(Qc.angular={});Qc.document.documentMode;function pae(t){if(t==null||SS(t))return!1;if(Ec(t)||qv(t)||dae)return!0;var e="length"in Object(t)&&t.length;return bS(e)&&(e>=0&&(e-1 in t||t instanceof Array)||typeof t.item=="function")}function Dt(t,e,r){var n,i;if(t)if(VF(t))for(n in t)n!=="prototype"&&n!=="length"&&n!=="name"&&t.hasOwnProperty(n)&&e.call(r,t[n],n,t);else if(Ec(t)||pae(t)){var a=typeof t!="object";for(n=0,i=t.length;n"u"}function sl(t){return typeof t<"u"}function UF(t){return t!==null&&typeof t=="object"}function $F(t){return t!==null&&typeof t=="object"&&!jF(t)}function qv(t){return typeof t=="string"}function bS(t){return typeof t=="number"}function VF(t){return typeof t=="function"}function SS(t){return t&&t.window===t}function GF(t){return t&&t.$evalAsync&&t.$watch}var gae=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;function yae(t){return t&&bS(t.length)&&gae.test(_S.call(t))}function _ae(t){return _S.call(t)==="[object ArrayBuffer]"}function xae(t,e){var r=[],n=[];if(e){if(yae(e)||_ae(e))throw qg("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t===e)throw qg("cpi","Can't copy! Source and destination are identical.");return Ec(e)?e.length=0:Dt(e,function(s,u){u!=="$$hashKey"&&delete e[u]}),r.push(t),n.push(e),i(t,e)}return a(t);function i(s,u){var l=u.$$hashKey,c;if(Ec(s))for(var f=0,h=s.length;f=0)return"...";e.push(n)}return n})}function RP(t){return typeof t=="function"?t.toString().replace(/ \{[\s\S]*$/,""):mae(t)?"undefined":typeof t!="string"?Eae(t):t}function XF(t,e){return e=e||Error,function(){var r=2,n=arguments,i=n[0],a="["+(t?t+":":"")+i+"] ",o=n[1],s,u;for(a+=o.replace(/\{\d+\}/g,function(l){var c=+l.slice(1,-1),f=c+r;return f{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],i=e;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0,a=r={callback:n,next:null,prev:r};return a.prev?a.prev.next=a:e=a,function(){!i||e===null||(i=!1,a.next?a.next.prev=a.prev:r=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}const _P={notify(){},get:()=>[]};function jre(t,e){let r,n=_P,i=0,a=!1;function o(v){c();const g=n.subscribe(v);let m=!1;return()=>{m||(m=!0,g(),f())}}function s(){n.notify()}function u(){p.onStateChange&&p.onStateChange()}function l(){return a}function c(){i++,r||(r=e?e.addNestedSub(u):t.subscribe(u),n=Bre())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=_P)}function h(){a||(a=!0,c())}function d(){a&&(a=!1,f())}const p={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:d,getListeners:()=>n};return p}const Ure=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$re=Ure?ne.useLayoutEffect:ne.useEffect;function yF({store:t,context:e,children:r,serverState:n,stabilityCheck:i="once",noopCheck:a="once"}){const o=ne.useMemo(()=>{const l=jre(t);return{store:t,subscription:l,getServerState:n?()=>n:void 0,stabilityCheck:i,noopCheck:a}},[t,n,i,a]),s=ne.useMemo(()=>t.getState(),[t]);$re(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==t.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,s]);const u=e||Eo;return ne.createElement(u.Provider,{value:o},r)}function _F(t=Eo){const e=t===Eo?fF:nS(t);return function(){const{store:n}=e();return n}}const Vre=_F();function Gre(t=Eo){const e=t===Eo?Vre:_F(t);return function(){return e().dispatch}}const Lr=Gre();Ere(yre.useSyncExternalStoreWithSelector);xre(XI.unstable_batchedUpdates);const _n=()=>{const t=Lr();return{playSeEnter:()=>{t(Ge({key:"uiSe",value:iF}))},playSeClick:()=>{t(Ge({key:"uiSe",value:aF}))},playSePageChange:()=>{t(Ge({key:"uiSe",value:Zte}))},playSeDialogOpen:()=>{t(Ge({key:"uiSe",value:Jte}))},playSeSwitch:()=>{t(Ge({key:"uiSe",value:Qte}))}}},uS=()=>({playSeEnter:()=>{te.dispatch(Ge({key:"uiSe",value:iF}))},playSeClick:()=>{te.dispatch(Ge({key:"uiSe",value:aF}))}}),Xre=[{reg:/\\\\/g,val:"\\"},{reg:/\\\|/g,val:"|"},{reg:/\\:/g,val:":"},{reg:/\\,/g,val:","},{reg:/\\;/g,val:";"},{reg:/\\./g,val:"."}],cS=t=>{let e=t;for(let r of Xre)e=e.replaceAll(r.reg,r.val);return e};function zre(t){return Kv.parseScssToWebgalStyleObj(t)}function wi(t){const[e,r]=ne.useState(t);return{_value:e,set:function(n){this._value=n,r(n)},get value(){return this._value},set value(n){this.set(n)}}}function Wre(t){if(t.sheet)return t.sheet;for(var e=0;e0?Gr(hu,--Pn):0,jl--,sr===10&&(jl=1,Yv--),sr}function Bn(){return sr=Pn2||Kc(sr)>3?"":" "}function ane(t,e){for(;--e&&Bn()&&!(sr<48||sr>102||sr>57&&sr<65||sr>70&&sr<97););return Xf(t,pd()+(e<6&&Ji()==32&&Bn()==32))}function l_(t){for(;Bn();)switch(sr){case t:return Pn;case 34:case 39:t!==34&&t!==39&&l_(sr);break;case 40:t===41&&l_(t);break;case 92:Bn();break}return Pn}function one(t,e){for(;Bn()&&t+sr!==47+10;)if(t+sr===42+42&&Ji()===47)break;return"/*"+Xf(e,Pn-1)+"*"+Wv(t===47?t:Bn())}function sne(t){for(;!Kc(Ji());)Bn();return Xf(t,Pn)}function lne(t){return TF(md("",null,null,null,[""],t=EF(t),0,[0],t))}function md(t,e,r,n,i,a,o,s,u){for(var l=0,c=0,f=o,h=0,d=0,p=0,v=1,g=1,m=1,y=0,_="",x=i,b=a,S=n,w=_;g;)switch(p=y,y=Bn()){case 40:if(p!=108&&Gr(w,f-1)==58){s_(w+=ot(vd(y),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:w+=vd(y);break;case 9:case 10:case 13:case 32:w+=ine(p);break;case 92:w+=ane(pd()-1,7);continue;case 47:switch(Ji()){case 42:case 47:yh(une(one(Bn(),pd()),e,r),u);break;default:w+="/"}break;case 123*v:s[l++]=Ui(w)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:m==-1&&(w=ot(w,/\f/g,"")),d>0&&Ui(w)-f&&yh(d>32?bP(w+";",n,r,f-1):bP(ot(w," ","")+";",n,r,f-2),u);break;case 59:w+=";";default:if(yh(S=xP(w,e,r,l,c,i,s,_,x=[],b=[],f),a),y===123)if(c===0)md(w,e,S,S,x,a,f,s,b);else switch(h===99&&Gr(w,3)===110?100:h){case 100:case 108:case 109:case 115:md(t,S,S,n&&yh(xP(t,S,S,0,0,i,s,_,i,x=[],f),b),i,b,f,s,n?x:b);break;default:md(w,S,S,S,[""],b,0,s,b)}}l=c=d=0,v=m=1,_=w="",f=o;break;case 58:f=1+Ui(w),d=p;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&nne()==125)continue}switch(w+=Wv(y),y*v){case 38:m=c>0?1:(w+="\f",-1);break;case 44:s[l++]=(Ui(w)-1)*m,m=1;break;case 64:Ji()===45&&(w+=vd(Bn())),h=Ji(),c=f=Ui(_=w+=sne(pd())),y++;break;case 45:p===45&&Ui(w)==2&&(v=0)}}return a}function xP(t,e,r,n,i,a,o,s,u,l,c){for(var f=i-1,h=i===0?a:[""],d=dS(h),p=0,v=0,g=0;p0?h[m]+" "+y:ot(y,/&\f/g,h[m])))&&(u[g++]=_);return Hv(t,e,r,i===0?fS:s,u,l,c)}function une(t,e,r){return Hv(t,e,r,xF,Wv(rne()),qc(t,2,-2),0)}function bP(t,e,r,n){return Hv(t,e,r,hS,qc(t,0,n),qc(t,n+1,-1),n)}function El(t,e){for(var r="",n=dS(t),i=0;i6)switch(Gr(t,e+1)){case 109:if(Gr(t,e+4)!==45)break;case 102:return ot(t,/(.+:)(.+)-([^]+)/,"$1"+at+"$2-$3$1"+up+(Gr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~s_(t,"stretch")?AF(ot(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Gr(t,e+1)!==115)break;case 6444:switch(Gr(t,Ui(t)-3-(~s_(t,"!important")&&10))){case 107:return ot(t,":",":"+at)+t;case 101:return ot(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+at+(Gr(t,14)===45?"inline-":"")+"box$3$1"+at+"$2$3$1"+Yr+"$2box$3")+t}break;case 5936:switch(Gr(t,e+11)){case 114:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return at+t+Yr+t+t}return t}var _ne=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case hS:e.return=AF(e.value,e.length);break;case bF:return El([Uu(e,{value:ot(e.value,"@","@"+at)})],i);case fS:if(e.length)return tne(e.props,function(a){switch(ene(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return El([Uu(e,{props:[ot(a,/:(read-\w+)/,":"+up+"$1")]})],i);case"::placeholder":return El([Uu(e,{props:[ot(a,/:(plac\w+)/,":"+at+"input-$1")]}),Uu(e,{props:[ot(a,/:(plac\w+)/,":"+up+"$1")]}),Uu(e,{props:[ot(a,/:(plac\w+)/,Yr+"input-$1")]})],i)}return""})}},xne=[_ne],bne=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var g=v.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=e.stylisPlugins||xne,a={},o,s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var g=v.getAttribute("data-emotion").split(" "),m=1;m=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var wne={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ene=/[A-Z]|^ms/g,Tne=/_EMO_([^_]+?)_([^]*?)_EMO_/g,CF=function(e){return e.charCodeAt(1)===45},wP=function(e){return e!=null&&typeof e!="boolean"},Yg=dne(function(t){return CF(t)?t:t.replace(Ene,"-$&").toLowerCase()}),EP=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Tne,function(n,i,a){return $i={name:i,styles:a,next:$i},i})}return wne[e]!==1&&!CF(e)&&typeof r=="number"&&r!==0?r+"px":r};function Zc(t,e,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return $i={name:r.name,styles:r.styles,next:$i},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)$i={name:n.name,styles:n.styles,next:$i},n=n.next;var i=r.styles+";";return i}return Ane(t,e,r)}case"function":{if(t!==void 0){var a=$i,o=r(t);return $i=a,Zc(t,e,o)}break}}if(e==null)return r;var s=e[r];return s!==void 0?s:r}function Ane(t,e,r){var n="";if(Array.isArray(r))for(var i=0;ia.stage.replacedUIlable),n=(a,o)=>{var u;const s=(r==null?void 0:r[a])??a;if(Object.keys(e.value.classNameStyles).includes(s)){const l=ac(((u=e.value.classNameStyles)==null?void 0:u[s])??"");return`${o} ${l}`}return o},i=async()=>{ge.debug("更新 Scss 文件",t);const o=(await Wc.get(`game/template/${t}`)).data;e.set(zre(o))};return ne.useEffect(()=>{i()},[]),ne.useEffect(()=>{kne(e.value.others)},[e.value.others]),Mne(i),n}function Mne(t){const e=()=>{t()};ne.useEffect(()=>(L.events.styleUpdate.on(e),()=>L.events.styleUpdate.off(e)),[])}class vS{constructor(e,r){Ae(this,"text");Ae(this,"jump");Ae(this,"jumpToScene");Ae(this,"showCondition");Ae(this,"enableCondition");this.text=cS(e),this.jump=r,this.jumpToScene=r.match(new RegExp("(?"),n=r.length>1?r[0]:null,a=(r.length>1?r[1]:r[0]).split(new RegExp("(?{const r=t.content.split(new RegExp("(?vS.parse(n));return ea.render(C.jsx(yF,{store:te,children:C.jsx(Nne,{chooseOptions:r})}),document.getElementById("chooseContainer")),{performName:"choose",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{ea.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}};function Nne(t){const r=te.getState().userData.optionData.textboxFont===Zi.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:n,playSeClick:i}=uS(),a=pS("Stage/Choose/choose.scss"),o=s=>s.filter((u,l)=>d_(u.showCondition)).map((u,l)=>{const c=d_(u.enableCondition),f=c?a("Choose_item",gh.Choose_item):a("Choose_item_disabled",gh.Choose_item_disabled),h=c?()=>{i(),u.jumpToScene?rF(u.jump,u.text):nF(u.jump),L.gameplay.performController.unmountPerform("choose")}:()=>{};return C.jsx("div",{className:a("Choose_item_outer",gh.Choose_item_outer),children:C.jsx("div",{className:f,style:{fontFamily:r},onClick:h,onMouseEnter:n,children:u.text})},u.jump+l)});return C.jsx("div",{className:a("Choose_Main",gh.Choose_Main),children:o(t.chooseOptions)})}const Lne=t=>(ge.debug(`脚本内注释${t.content}`),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Dne=t=>(t.content!==""&&t.content!=="none"?te.dispatch(Ge({key:"enableFilm",value:t.content})):te.dispatch(Ge({key:"enableFilm",value:""})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Bne="_Choose_Main_4xkm5_1",jne="_Choose_item_4xkm5_13",Une="_glabalDialog_container_inner_4xkm5_28",$ne="_glabalDialog_container_4xkm5_28",Vne="_title_4xkm5_47",Gne="_button_4xkm5_59",Vs={Choose_Main:Bne,Choose_item:jne,glabalDialog_container_inner:Une,glabalDialog_container:$ne,title:Vne,button:Gne},Xne=t=>{const e=t.content.toString().trim(),r=He(t,"title"),n=(r===0?"Please Input":r)??"Please Input",i=He(t,"buttonText"),a=(i===0?"OK":i)??"OK",s=te.getState().userData.optionData.textboxFont===Zi.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:u,playSeClick:l}=uS(),c=C.jsx("div",{style:{fontFamily:s},className:Vs.glabalDialog_container,children:C.jsxs("div",{className:Vs.glabalDialog_container_inner,children:[C.jsx("div",{className:Vs.title,children:n}),C.jsx("input",{id:"user-input",className:Vs.Choose_item}),C.jsx("div",{onMouseEnter:u,onClick:()=>{const f=document.getElementById("user-input");f&&te.dispatch(Pk({key:e,value:((f==null?void 0:f.value)??"")===""?" ":(f==null?void 0:f.value)??""})),l(),L.gameplay.performController.unmountPerform("userInput"),tn()},className:Vs.button,children:a})]})});return ea.render(C.jsx("div",{className:Vs.Choose_Main,children:c}),document.getElementById("chooseContainer")),{performName:"userInput",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{ea.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}},zne="_FullScreenPerform_main_7er8a_2",Wne="_FullScreenPerform_element_7er8a_9",Yne="_fullScreen_video_7er8a_17",Hne="_fadeIn_7er8a_74",qne="_intro_showSoftly_7er8a_1",Kne="_slideIn_7er8a_80",Zne="_typingEffect_7er8a_86",Qne="_typing_7er8a_86",Jne="_blinkCursor_7er8a_1",eie="_pixelateEffect_7er8a_95",tie="_pixelateAnimation_7er8a_1",rie="_revealAnimation_7er8a_101",nie="_videoContainer_7er8a_115",Bi={FullScreenPerform_main:zne,FullScreenPerform_element:Wne,fullScreen_video:Yne,fadeIn:Hne,intro_showSoftly:qne,slideIn:Kne,typingEffect:Zne,typing:Qne,blinkCursor:Jne,pixelateEffect:eie,pixelateAnimation:tie,revealAnimation:rie,videoContainer:nie},iie=t=>{const e=`introPerform${Math.random().toString()}`;let r,n="rgba(0, 0, 0, 1)",i="rgba(255, 255, 255, 1)";const a=(b,S=0)=>{switch(b){case"fadeIn":return Bi.fadeIn;case"slideIn":return Bi.slideIn;case"typingEffect":return`${Bi.typingEffect} ${S}`;case"pixelateEffect":return Bi.pixelateEffect;case"revealAnimation":return Bi.revealAnimation;default:return Bi.fadeIn}};let o=Bi.fadeIn,s=1500,u=!1;for(const b of t.args){if(b.key==="backgroundColor"&&(n=b.value||"rgba(0, 0, 0, 1)"),b.key==="fontColor"&&(i=b.value||"rgba(255, 255, 255, 1)"),b.key==="fontSize")switch(b.value){case"small":r="280%";break;case"medium":r="350%";break;case"large":r="420%";break}if(b.key==="animation"&&(o=a(b.value)),b.key==="delayTime"){const S=parseInt(b.value.toString(),10);s=isNaN(S)?s:S}b.key==="hold"&&b.value===!0&&(u=!0)}const l={background:n,color:i,fontSize:r||"350%",width:"100%",height:"100%"},c=t.content.split(new RegExp("(?cS(b));let h=1e3+s*c.length;const d=u?1e3*60*60*24:1e3+s*c.length;let p=!0,v=setTimeout(()=>{p=!1},h),g=setTimeout(()=>{});const m=()=>{const b=document.getElementById("introContainer");if(h-=s,clearTimeout(v),v=setTimeout(()=>{p=!1},h),b){const S=b.childNodes[0].childNodes[0].childNodes,w=S.length;S.forEach((E,T)=>{const A=Number(E.style.animationDelay.split("ms")[0]);A>0&&(E.style.animationDelay=`${A-s}ms`),T===w-1&&(A===0?(clearTimeout(g),L.gameplay.performController.unmountPerform(e)):(clearTimeout(g),u||(g=setTimeout(()=>{L.gameplay.performController.unmountPerform(e)},h))))})}};L.events.userInteractNext.on(m);const y=c.map((b,S)=>C.jsxs("div",{style:{animationDelay:`${s*S}ms`},className:o,children:[b,b===""?" ":""]},"introtext"+S+Math.random().toString())),_=C.jsx("div",{style:l,children:C.jsx("div",{style:{padding:"3em 4em 3em 4em"},children:y})});ea.render(_,document.getElementById("introContainer"));const x=document.getElementById("introContainer");return x&&(x.style.display="block"),{performName:e,duration:d,isHoldOn:!1,stopFunction:()=>{const b=document.getElementById("introContainer");b&&(b.style.display="none"),L.events.userInteractNext.off(m)},blockingNext:()=>p,blockingAuto:()=>p,stopTimeout:void 0,goNextWhenOver:!0}},aie=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),oie=t=>{let e=t.content;return(t.content==="none"||t.content==="")&&(e=""),te.dispatch(Ge({key:"miniAvatar",value:e})),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},sie="modulepreload",lie=function(t,e){return new URL(t,e).href},PP={},uie=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=lie(a,n),a in PP)return;PP[a]=!0;const o=a.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(!!n)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===a&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":sie,o||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},RF=new Map;function cie(t){return t?typeof t=="string"?t:t():null}function IF(t){const e=cie(t);return e||(ge.error("Get name of perform failed. There no name of the perform."),"")}function _we(t,e){if(!e||typeof e!="function")throw new Error(`"${t}" is not a callback.`);RF.set(IF(t),e)}function fie(t,e=[]){const r=RF.get(IF(t));if(!r||!(r instanceof Function))throw ge.error(`Can't call the perform named "${t}"`),new Error(`"${t}" don't have the pixiPerform callback.`);return r(...e)}uie(()=>import("./initRegister-8a9071ee.js"),[],import.meta.url);const hie=t=>{const e="PixiPerform"+t.content;L.gameplay.performController.performList.forEach(a=>{if(a.performName===e)return{performName:"none",duration:0,isOver:!1,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}});const r=fie(t.content),{container:n,tickerKey:i}=r;return{performName:e,duration:0,isHoldOn:!0,stopFunction:()=>{var a,o;ge.warn("现在正在卸载pixi演出"),n.destroy({texture:!0,baseTexture:!0}),(a=L.gameplay.pixiStage)==null||a.effectsContainer.removeChild(n),(o=L.gameplay.pixiStage)==null||o.removeAnimation(i)},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},die=t=>{var a;ge.debug("play SE");let e="effect-sound";L.gameplay.performController.unmountPerform(e,!0);let r=t.content,n=!1;He(t,"id")&&(e=`effect-sound-${((a=He(t,"id"))==null?void 0:a.toString())??""}`,L.gameplay.performController.unmountPerform(e,!0),n=!0);let i=!1;return{performName:"none",blockingAuto(){return!1},blockingNext(){return!1},isHoldOn:!1,stopFunction(){},stopTimeout:void 0,duration:1e3*60*60,arrangePerformPromise:new Promise(o=>{setTimeout(()=>{var p;const s=He(t,"volume");let u=document.createElement("audio");u.src=r,n&&(u.loop=!0);const l=te.getState().userData,c=l.optionData.volumeMain,f=typeof s=="number"&&s>=0&&s<=100?s:100,h=c*.01*(((p=l.optionData)==null?void 0:p.seVolume)??100)*.01*f*.01;u.volume=h,u.currentTime=0;const d={performName:e,duration:1e3*60*60,isHoldOn:n,skipNextCollect:!0,stopFunction:()=>{u.pause(),u.remove()},blockingNext:()=>!1,blockingAuto:()=>n?!1:!i,stopTimeout:void 0};o(d),u==null||u.play(),u.onended=()=>{for(const v of L.gameplay.performController.performList)v.performName===e&&(i=!0,v.stopFunction(),L.gameplay.performController.unmountPerform(v.performName))}},1)})}},pie=t=>{const e=te.getState().userData,r=e.optionData.volumeMain,n=r*.01*e.optionData.vocalVolume*.01,i=r*.01*e.optionData.bgmVolume*.01,a=TS();let o=He(t,"skipOff"),s=!1;o&&(s=!0),ea.render(C.jsx("div",{className:Bi.videoContainer,children:C.jsx("video",{className:Bi.fullScreen_video,id:"playVideoElement",src:t.content,autoPlay:!0})}),document.getElementById("videoContainer"));let u=!1;return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>s,blockingAuto:()=>!0,stopTimeout:void 0,arrangePerformPromise:new Promise(l=>{setTimeout(()=>{let c=document.getElementById("playVideoElement");if(c!==null){c.currentTime=0,c.volume=i;const f=()=>{for(const y of L.gameplay.performController.performList)y.performName===a&&(u=!0,y.stopFunction(),L.gameplay.performController.unmountPerform(y.performName))},h=()=>{f()};L.events.fullscreenDbClick.on(h);const d={performName:a,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{L.events.fullscreenDbClick.off(h);const y=document.getElementById("currentBgm");y&&(y.volume=i.toString());const _=document.getElementById("currentVocal");y&&(_.volume=n.toString()),ea.render(C.jsx("div",{}),document.getElementById("videoContainer"))},blockingNext:()=>s,blockingAuto:()=>!u,stopTimeout:void 0,goNextWhenOver:!0};l(d);const p=0,v=0,g=document.getElementById("currentBgm");g&&(g.volume=v.toString());const m=document.getElementById("currentVocal");g&&(m.volume=p.toString()),c==null||c.play(),c.onended=()=>{f()}}},1)})}},vie=t=>{var o;te.getState().stage.currentDialogKey;const e=t.content,r=En(e),n=(((o=He(t,"target"))==null?void 0:o.toString())??"default_id").toString(),i=`${n}-${e}-${r}`;let a;return setTimeout(()=>{var u,l;(u=L.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n);const s=lp(e,n,r);s&&(ge.debug(`动画${e}作用在${n}`,r),(l=L.gameplay.pixiStage)==null||l.registerAnimation(s,i,n))},0),a=()=>{setTimeout(()=>{var s;te.getState().stage.currentDialogKey,(s=L.gameplay.pixiStage)==null||s.removeAnimationWithSetEffects(i)},0)},{performName:i,duration:r,isHoldOn:!1,stopFunction:a,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function mie(t,e){const r=L.gameplay.pixiStage.getStageObjByKey(t);function n(){r&&(r.pixiContainer.alpha=0,r.pixiContainer.blur=0)}function i(){r&&(r.pixiContainer.alpha=1,r.pixiContainer.blur=5)}function a(o){if(r){const s=r.pixiContainer,u=L.gameplay.pixiStage.frameDuration,l=e/u*o,c=1/l,f=5/l;s.alpha<1&&(s.alpha+=c),s.blur<5&&(s.blur+=f)}}return{setStartState:n,setEndState:i,tickerFunc:a}}const gie=[{name:"universalSoftIn",animationGenerateFunc:SM},{name:"universalSoftOff",animationGenerateFunc:wM},{name:"testblur",animationGenerateFunc:mie}],yie=t=>{var s,u,l;te.getState().stage.currentDialogKey;const e=t.content,r=He(t,"duration")??0,n=((s=He(t,"target"))==null?void 0:s.toString())??"0",i=`${n}-${e}-${r}`,a=_ie(e);let o=()=>{};if(a){ge.debug(`动画${e}作用在${n}`,r);const c=a(n,r);(u=L.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n),(l=L.gameplay.pixiStage)==null||l.registerAnimation(c,i,n),o=()=>{var f;te.getState().stage.currentDialogKey,(f=L.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(i)}}return{performName:i,duration:r,isHoldOn:!1,stopFunction:o,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function _ie(t){const e=gie.find(r=>r.name===t);return ge.debug("装载动画",e),e?e.animationGenerateFunc:null}const xie=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),bie=t=>{var l;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;try{n=JSON.parse(r)}catch{n=[]}const i={name:e,effects:n};L.animationManager.addAnimation(i);const a=En(e),o=((l=He(t,"target"))==null?void 0:l.toString())??"0",s=`${o}-${e}-${a}`;let u=()=>{};return setTimeout(()=>{var f,h;(f=L.gameplay.pixiStage)==null||f.stopPresetAnimationOnTarget(o);const c=lp(e,o,a);c&&(ge.debug(`动画${e}作用在${o}`,a),(h=L.gameplay.pixiStage)==null||h.registerAnimation(c,s,o))},0),u=()=>{setTimeout(()=>{var c;te.getState().stage.currentDialogKey,(c=L.gameplay.pixiStage)==null||c.removeAnimationWithSetEffects(s)},0)},{performName:s,duration:a,isHoldOn:!1,stopFunction:u,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Sie(t){return t.content==="hide"?te.dispatch(Ge({key:"isDisableTextbox",value:!0})):te.dispatch(Ge({key:"isDisableTextbox",value:!1})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}}const wie=t=>{var c;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;const i=He(t,"duration"),a=((c=He(t,"target"))==null?void 0:c.toString())??"0";try{const f=JSON.parse(r);n=Yc(a,f,i)}catch{n=[]}const o={name:e,effects:n};L.animationManager.addAnimation(o);const s=Tie(e),u=`${a}-${e}-${s}`;let l=()=>{};return setTimeout(()=>{var h,d;(h=L.gameplay.pixiStage)==null||h.stopPresetAnimationOnTarget(a);const f=Eie(e,a,s);f&&(ge.debug(`动画${e}作用在${a}`,s),(d=L.gameplay.pixiStage)==null||d.registerAnimation(f,u,a))},0),l=()=>{setTimeout(()=>{var f;te.getState().stage.currentDialogKey,(f=L.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(u)},0)},{performName:u,duration:s,isHoldOn:!1,stopFunction:l,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Eie(t,e,r){const n=L.animationManager.getAnimations().find(i=>i.name===t);if(n){const i=n.effects.map(a=>{const o=Jt({...Kb,duration:0});return Object.assign(o,a),o.duration=a.duration,o});return ge.debug("装载自定义动画",i),tF(i,e,r)}return null}function Tie(t){const e=L.animationManager.getAnimations().find(r=>r.name===t);if(e){let r=0;return e.effects.forEach(n=>{r+=n.duration}),r}return 0}const Aie=t=>{let e="0";for(const r of t.args)r.key==="target"&&(e=r.value.toString());return He(t,"enter")&&L.animationManager.nextEnterAnimationName.set(e,He(t,"enter").toString()),He(t,"exit")&&L.animationManager.nextExitAnimationName.set(e+"-off",He(t,"exit").toString()),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},Cie=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),ge.info(`解锁BGM:${r},路径:${e},所属系列:${n}`),te.dispatch(Wk({name:r,url:e,series:n}));const i=te.getState().userData;return Os.setItem(L.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},Pie=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),ge.info(`解锁CG:${r},路径:${e},所属系列:${n}`),te.dispatch(zk({name:r,url:e,series:n}));const i=te.getState().userData;return Os.setItem(L.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},mS=(t,e=!0)=>{t&&L.backlogManager.makeBacklogEmpty(),e&&L.sceneManager.resetScene(),L.gameplay.performController.removeAllPerform(),L.gameplay.resetGamePlay();const r=Jt(Ck),n=te.getState().stage.GameVar;te.dispatch(ov(r)),e||te.dispatch(Ge({key:"GameVar",value:n}))},Oie={saveData:[],quickSaveData:null},kF=Qp({name:"saveData",initialState:Jt(Oie),reducers:{setFastSave:(t,e)=>{t.quickSaveData=e.payload},resetFastSave:t=>{t.quickSaveData=null},resetSaves:t=>{t.quickSaveData=null,t.saveData=[]},saveGame:(t,e)=>{t.saveData[e.payload.index]=e.payload.saveData},replaceSaveGame:(t,e)=>{t.saveData=e.payload}}}),Oa=kF.actions,Rie=kF.reducer,Iie=t=>{mS(!0);const e=te.dispatch,r=Nn("start.txt",Fn.scene);return setTimeout(()=>{L.sceneManager.resetScene()},5),e(Oa.resetFastSave()),hp(),ua(r).then(n=>{L.sceneManager.sceneData.currentScene=ca(n,"start.txt",r)}),e(rt({component:"showTitle",visibility:!0})),AS(te.getState().GUI.titleBgm),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},kie=t=>(nF(t.content),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Mie=t=>(L.gameplay.performController.performList.forEach(e=>{if(e.performName.match(/PixiPerform/)){ge.warn("pixi 被脚本重新初始化",e.performName);for(let r=0;r{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),ut={audioContext:new AudioContext,source:null,analyser:void 0,dataArray:void 0,audioLevelInterval:setInterval(()=>{},0),blinkTimerID:setTimeout(()=>{},0),maxAudioLevel:0},Fie=t=>(ut.maxAudioLevel=Math.max(t,ut.maxAudioLevel),{OPEN_THRESHOLD:ut.maxAudioLevel*.75,HALF_OPEN_THRESHOLD:ut.maxAudioLevel*.5}),Nie=t=>{let e=!1;function r(){var n;e||t.animationEndTime&&Date.now()>t.animationEndTime||(e=!0,(n=L.gameplay.pixiStage)==null||n.performBlinkAnimation(t.key,t.animationItem,"closed",t.pos),ut.blinkTimerID=setTimeout(()=>{var a;(a=L.gameplay.pixiStage)==null||a.performBlinkAnimation(t.key,t.animationItem,"open",t.pos),e=!1;const i=Math.random()*300+3500;ut.blinkTimerID=setTimeout(r,i)},200))}r()},Lie=(t,e,r)=>{t.getByteFrequencyData(e);let n=0;for(let i=0;i{var h,d;const{audioLevel:e,OPEN_THRESHOLD:r,HALF_OPEN_THRESHOLD:n,currentMouthValue:i,lerpSpeed:a,key:o,animationItem:s,pos:u}=t;let l;e>r?l=1:e>n?l=.5:l=0;const c=i+(l-i)*a;(h=L.gameplay.pixiStage)==null||h.setModelMouthY(o,e);let f;c>.75?f="open":c>.25?f="half_open":f="closed",s!==void 0&&((d=L.gameplay.pixiStage)==null||d.performMouthSyncAnimation(o,s,f,u))};class Die{constructor(e){Ae(this,"subject");Ae(this,"result");Ae(this,"isEnd",!1);this.subject=e}with(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this}endsWith(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this.evaluate()}default(e){return this.isEnd||(this.result=e()),this.evaluate()}evaluate(){return this.result}}function zf(t){return new Die(t)}const Bie=t=>{ge.debug("play vocal");const e="vocal-play",r=He(t,"vocal"),n=He(t,"volume");let i;i=te.getState().stage;let a="",o="";const s=i.freeFigure,u=i.figureAssociatedAnimation;let l=0,c=0;const f=1;let h=document.getElementById("currentVocal");L.gameplay.performController.unmountPerform("vocal-play",!0),h!==null&&(h.currentTime=0,h.pause());for(const p of t.args)p.value===!0&&zf(p.key).with("left",()=>{a="left"}).with("right",()=>{a="right"}).endsWith("center",()=>{a="center"}),p.key==="figureId"&&(o=`${p.value.toString()}`);te.dispatch(Ge({key:"playVocal",value:r})),te.dispatch(Ge({key:"vocal",value:r}));let d=!1;return{arrangePerformPromise:new Promise(p=>{setTimeout(()=>{let v=document.getElementById("currentVocal");if(typeof n=="number"&&n>=0&&n<=100?te.dispatch(Ge({key:"vocalVolume",value:n})):te.dispatch(Ge({key:"vocalVolume",value:100})),v!==null){v.currentTime=0;const g={performName:e,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{clearInterval(ut.audioLevelInterval),v.pause(),o=o||`fig-${a}`;const y=u.find(_=>_.targetId===o);u_({audioLevel:0,OPEN_THRESHOLD:1,HALF_OPEN_THRESHOLD:1,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:y,pos:a}),clearTimeout(ut.blinkTimerID)},blockingNext:()=>!1,blockingAuto:()=>!d,skipNextCollect:!0,stopTimeout:void 0};L.gameplay.performController.arrangeNewPerform(g,t,!1),o=o||`fig-${a}`;const m=u.find(y=>y.targetId===o);if(m){const y=s.find(b=>b.key===o);if(y&&(a=y.basePosition),!ut.audioContext){let b;b=new AudioContext,ut.analyser=b.createAnalyser(),ut.analyser.fftSize=256,ut.dataArray=new Uint8Array(ut.analyser.frequencyBinCount)}ut.analyser||(ut.analyser=ut.audioContext.createAnalyser(),ut.analyser.fftSize=256),l=ut.analyser.frequencyBinCount,ut.dataArray=new Uint8Array(l);let _=document.getElementById("currentVocal");ut.source||(ut.source=ut.audioContext.createMediaElementSource(_),ut.source.connect(ut.analyser)),ut.analyser.connect(ut.audioContext.destination),ut.audioLevelInterval=setInterval(()=>{const b=Lie(ut.analyser,ut.dataArray,l),{OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w}=Fie(b);u_({audioLevel:b,OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:m,pos:a})},50);let x;x=Date.now()+1e4,Nie({key:o,animationItem:m,pos:a,animationEndTime:x}),setTimeout(()=>{clearTimeout(ut.blinkTimerID)},1e4)}v==null||v.play(),v.onended=()=>{for(const y of L.gameplay.performController.performList)y.performName===e&&(d=!0,y.stopFunction(),L.gameplay.performController.unmountPerform(y.performName))}}},1)})}};function gS(t){switch(t){case hn.slow:return 80;case hn.normal:return 35;case hn.fast:return 3}}function MF(t){switch(t){case hn.slow:return 800;case hn.normal:return 350;case hn.fast:return 200}}function FF(){const t=Ne(r=>r.userData.optionData.textboxFont);function e(){return zf(t).with(Zi.song,()=>'"思源宋体", serif').with(Zi.lxgw,()=>'"LXGW", serif').with(Zi.hei,()=>'"WebgalUI", serif').default(()=>'"WebgalUI", serif')}return e()}function c_(t){switch(t){case 0:return 155;case 1:return 205;case 2:return 230;default:return 205}}const jie="_TextBox_EventHandler_1jt23_2",Uie="_TextBox_Container_1jt23_10",$ie="_showSoftly_1jt23_1",Vie="_TextBox_main_1jt23_18",Gie="_TextBox_main_miniavatarOff_1jt23_39",Xie="_TextBox_Background_1jt23_43",zie="_TextBox_textElement_start_1jt23_56",Wie="_TextDelayShow_1jt23_1",Yie="_outer_1jt23_64",Hie="_inner_1jt23_78",qie="_zhanwei_1jt23_89",Kie="_TextBox_textElement_Settled_1jt23_97",Zie="_TextBox_showName_1jt23_104",Qie="_TextBox_ShowName_Background_1jt23_117",Jie="_miniAvatarContainer_1jt23_132",eae="_miniAvatarImg_1jt23_142",tae="_nameContainer_1jt23_150",rae="_outerName_1jt23_156",nae="_innerName_1jt23_167",iae="_text_1jt23_174",yt={TextBox_EventHandler:jie,TextBox_Container:Uie,showSoftly:$ie,TextBox_main:Vie,TextBox_main_miniavatarOff:Gie,TextBox_Background:Xie,TextBox_textElement_start:zie,TextDelayShow:Wie,outer:Yie,inner:Hie,zhanwei:qie,TextBox_textElement_Settled:Kie,TextBox_showName:Zie,TextBox_ShowName_Background:Qie,miniAvatarContainer:Jie,miniAvatarImg:eae,nameContainer:tae,outerName:rae,innerName:nae,text:iae};function NF(t){const{textArray:e,textDelay:r,currentConcatDialogPrev:n,currentDialogKey:i,isText:a,isSafari:o,isFirefox:s,fontSize:u,miniAvatar:l,isHasName:c,showName:f,font:h,textDuration:d,isUseStroke:p,textboxOpacity:v,textSizeState:g}=t,m=pS("Stage/TextBox/textbox.scss");ne.useEffect(()=>{function b(){[...document.querySelectorAll(".Textelement_start")].forEach(E=>{E.className=m("TextBox_textElement_Settled",yt.TextBox_textElement_Settled)})}return L.events.textSettle.on(b),()=>{L.events.textSettle.off(b)}},[]);let y=0;const _=f.map((b,S)=>{const w=b.map((E,T)=>{const A=E.reactNode;let O="",P="",k=!1;if(E.enhancedValue){k=!0;const j=E.enhancedValue;for(const z of j){const{key:J,value:Z}=z;switch(J){case"style":O=Z;break;case"tips":break;case"style-alltext":P=Z;break}}}const M=" "+ac(O,{label:"showname"}),B=" "+ac(P,{label:"showname"});return k?C.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:yt.zhanwei+B,children:[A,C.jsx("span",{className:m("outerName",yt.outerName)+M+B,children:A}),p&&C.jsx("span",{className:m("innerName",yt.innerName)+B,children:A})]})},T):C.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:yt.zhanwei+B,children:[A,C.jsx("span",{className:m("outerName",yt.outerName)+M+B,children:A}),p&&C.jsx("span",{className:m("innerName",yt.innerName)+B,children:A})]})},T)});return C.jsx("div",{style:{wordBreak:o||t.isFirefox?"break-all":void 0,display:o?"flex":void 0,flexWrap:o?"wrap":void 0},children:w},`text-line-${S}`)}),x=e.map((b,S)=>{const w=b.map((E,T)=>{const A=E.reactNode;let O="",P="";if(E.enhancedValue){const z=E.enhancedValue;for(const J of z){const{key:Z,value:$}=J;switch(Z){case"style":O=$;break;case"tips":break;case"style-alltext":P=$;break}}}let k=y*r;y++;let M=n.length;n!==""&&y>=M&&(k=k-M*r);const B=" "+ac(O),j=" "+ac(P);return y{const[t,e]=ne.useState(!0);ne.useEffect(()=>{const _=()=>{const x=cp.height,b=cp.width,S=window.innerHeight,w=window.innerWidth,E=S/x,T=w/b,A=w/x,O=S/b;[E,T,A,O].forEach(P=>{P<=.2?e(!1):e(!0)})};return window.addEventListener("resize",_),_(),()=>{window.removeEventListener("resize",_)}},[]);const r=Ne(_=>_.stage),n=Ne(_=>_.userData),i=gS(n.optionData.textSpeed),a=MF(n.optionData.textSpeed);let o=c_(n.optionData.textSize)+"%";const s=FF(),u=r.showText!==""||r.showName!=="";let l=n.optionData.textSize;u&&r.showTextSize!==-1&&(o=c_(r.showTextSize)+"%",l=r.showTextSize);const c=zf(l).with(ti.small,()=>3).with(ti.medium,()=>2).with(ti.large,()=>2).default(()=>2),f=gs(r.showText,c),h=r.showName!=="",d=gs(r.showName,c),p=r.currentConcatDialogPrev,v=r.currentDialogKey,g=r.miniAvatar,m=n.optionData.textboxOpacity,y=NF;return C.jsx(y,{textArray:f,isText:u,textDelay:i,showName:d,isHasName:h,currentConcatDialogPrev:p,fontSize:o,currentDialogKey:v,isSafari:oae,isFirefox:aae,miniAvatar:g,textDuration:a,font:s,textSizeState:l,lineLimit:c,isUseStroke:t,textboxOpacity:m})};function OP(t){return!!t.match(/[\u4e00-\u9fa5]|[\u0800-\u4e00]|[\uac00-\ud7ff]/)}function gs(t,e,r){return t.split(new RegExp("(?cS(o)).map(o=>uae(o)).map(o=>{const s=[];return o.forEach((u,l)=>{zf(u.type).with("SegmentType.String",()=>{const c=lae(u.value);s.push(...c.map(f=>({reactNode:f})))}).endsWith("SegmentType.Link",()=>{const c=u.value,f=C.jsx("span",{className:"__enhanced_text",children:C.jsxs("ruby",{children:[c.text,C.jsx("rt",{children:c.ruby})]},l+c.text)},c.text+`${l}`);s.push({reactNode:f,enhancedValue:c.values})})}),s}).slice(0,r?void 0:e)}function lae(t){if(!t)return[""];const e=[];let r="",n=OP(t[0]);const i=a=>/[!-\/:-@\[-`{-~\u2000-\u206F\u3000-\u303F\uff00-\uffef]/g.test(a);for(const a of t)if(a===" ")r&&(e.push(r),r=""),e.push(" "),n=!1;else if(OP(a)&&!i(a))!n&&r&&(e.push(r),r=""),e.push(a),n=!0;else{if(i(a)){r?(r+=a,e.push(r),r=""):e.length>0?e[e.length-1]+=a:e.push(a);continue}n&&r&&(e.push(r),r=""),r+=a,n=!1}return r&&e.push(r),e}function uae(t){const e=/(\[(.*?)\]\((.*?)\))|([^\[\]]+)/g,r=[];let n;for(;(n=e.exec(t))!==null;)if(n[1]){const i=n[2],a=n[3];let o=[],s="";if(a.match(/style=|tips=|ruby=|style-alltext=/)){o=cae(a);const u=o.find(l=>l.key==="ruby");u&&(s=u.value)}else s=a;r.push({type:"SegmentType.Link",value:{text:i,ruby:s,values:o}})}else{const i=n[0];r.push({type:"SegmentType.String",value:i})}return r.unshift({type:"SegmentType.String",value:""}),r}function cae(t){const e=[],r=/(\S+)=(.*?)(?=\s+\S+=|\s*$)/g;let n;for(;(n=r.exec(t))!==null;)e.push({key:n[1],value:n[2].replace(/~/g,":").trim()});return e}const fae=t=>{const e=te.getState().stage,r=te.getState().userData,n=te.dispatch;let i=Math.random().toString(),a=t.content;a&&(a=String(a).replace(/ /g," "));const o=He(t,"concat"),s=He(t,"notend"),u=He(t,"speaker"),l=He(t,"clear"),c=He(t,"vocal");o?(i=e.currentDialogKey,a=e.showText+a,n(Ge({key:"currentConcatDialogPrev",value:e.showText}))):n(Ge({key:"currentConcatDialogPrev",value:""})),n(Ge({key:"showText",value:a})),n(Ge({key:"vocal",value:""})),r.optionData.voiceInterruption===zc.no&&c===null||(n(Ge({key:"playVocal",value:""})),L.gameplay.performController.unmountPerform("vocal-play",!0)),n(Ge({key:"currentDialogKey",value:i}));const f=gS(r.optionData.textSpeed),d=gs(t.content,3).reduce((E,T)=>E+T.length,0),p=f*d;for(const E of t.args)if(E.key==="fontSize")switch(E.value){case"default":n(Ge({key:"showTextSize",value:-1}));break;case"small":n(Ge({key:"showTextSize",value:ti.small}));break;case"medium":n(Ge({key:"showTextSize",value:ti.medium}));break;case"large":n(Ge({key:"showTextSize",value:ti.large}));break}let v=e.showName;u!==null&&(v=u),l&&(v=""),n(Ge({key:"showName",value:v}));let g=null,m=0,y="",_="";for(const E of t.args)E.value===!0&&zf(E.key).with("left",()=>{y="left"}).with("right",()=>{y="right"}).endsWith("center",()=>{y="center"}),E.key==="figureId"&&(_=`${E.value.toString()}`);let x=80;const b=(E=!1)=>{let T=x+(Math.random()*60-30);Math.abs(T-x)<5&&(T=x+Math.sign(T-x)*5),x=Math.max(15,Math.min(T,100));const P=te.getState().stage.figureAssociatedAnimation.find(M=>M.targetId===_),k=_||`fig-${y}`;E&&(x=0),u_({audioLevel:x,OPEN_THRESHOLD:50,HALF_OPEN_THRESHOLD:25,currentMouthValue:0,lerpSpeed:1,key:k,animationItem:P,pos:y}),E||(g=setTimeout(b,50))};c?Bie(t):(_||y)&&(m=d*250,b());const S=TS();let w=750-r.optionData.textSpeed*250;return s&&(w=0),{performName:S,duration:p+w+m,isHoldOn:!1,stopFunction:()=>{L.events.textSettle.emit(),g&&(b(!0),clearTimeout(g))},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0,goNextWhenOver:s}};var yS={},Qc={document:{}},DF=Object.prototype.hasOwnProperty,BF=function(t){return qv(t)?t.toLowerCase():t},Ec=Array.isArray,hae=function(t){return qv(t)?t.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)|32)}):t};"I".toLowerCase()!=="i"&&(BF=hae);var dae,_S=Object.prototype.toString,jF=Object.getPrototypeOf,qg=XF("ng");Qc.angular||(Qc.angular={});Qc.document.documentMode;function pae(t){if(t==null||SS(t))return!1;if(Ec(t)||qv(t)||dae)return!0;var e="length"in Object(t)&&t.length;return bS(e)&&(e>=0&&(e-1 in t||t instanceof Array)||typeof t.item=="function")}function Dt(t,e,r){var n,i;if(t)if(VF(t))for(n in t)n!=="prototype"&&n!=="length"&&n!=="name"&&t.hasOwnProperty(n)&&e.call(r,t[n],n,t);else if(Ec(t)||pae(t)){var a=typeof t!="object";for(n=0,i=t.length;n"u"}function sl(t){return typeof t<"u"}function UF(t){return t!==null&&typeof t=="object"}function $F(t){return t!==null&&typeof t=="object"&&!jF(t)}function qv(t){return typeof t=="string"}function bS(t){return typeof t=="number"}function VF(t){return typeof t=="function"}function SS(t){return t&&t.window===t}function GF(t){return t&&t.$evalAsync&&t.$watch}var gae=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;function yae(t){return t&&bS(t.length)&&gae.test(_S.call(t))}function _ae(t){return _S.call(t)==="[object ArrayBuffer]"}function xae(t,e){var r=[],n=[];if(e){if(yae(e)||_ae(e))throw qg("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t===e)throw qg("cpi","Can't copy! Source and destination are identical.");return Ec(e)?e.length=0:Dt(e,function(s,u){u!=="$$hashKey"&&delete e[u]}),r.push(t),n.push(e),i(t,e)}return a(t);function i(s,u){var l=u.$$hashKey,c;if(Ec(s))for(var f=0,h=s.length;f=0)return"...";e.push(n)}return n})}function RP(t){return typeof t=="function"?t.toString().replace(/ \{[\s\S]*$/,""):mae(t)?"undefined":typeof t!="string"?Eae(t):t}function XF(t,e){return e=e||Error,function(){var r=2,n=arguments,i=n[0],a="["+(t?t+":":"")+i+"] ",o=n[1],s,u;for(a+=o.replace(/\{\d+\}/g,function(l){var c=+l.slice(1,-1),f=c+r;return f <= >= && || ! = |".split(" "),function(t){gd[t]=!0});var Tae={n:` `,f:"\f",r:"\r",t:" ",v:"\v","'":"'",'"':'"'},f_=function(e){this.options=e};f_.prototype={constructor:f_,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index=55296&&r<=56319&&n>=56320&&n<=57343?t+e:t},isExpOperator:function(t){return t==="-"||t==="+"||this.isNumber(t)},throwError:function(t,e,r){r=r||this.index;var n=sl(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,r)+"]":" "+r;throw ll("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,n,this.text)},readNumber:function(){for(var t="",e=this.index;this.index0&&!this.peek("}",")",";","]")&&t.push(this.expressionStatement()),!this.expect(";"))return{type:le.Program,body:t}},expressionStatement:function(){return{type:le.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var t=this.expression();this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var t=this.ternary();if(this.expect("=")){if(!HF(t))throw ll("lval","Trying to assign a value to a non l-value");t={type:le.AssignmentExpression,left:t,right:this.assignment(),operator:"="}}return t},ternary:function(){var t=this.logicalOR(),e,r;return this.expect("?")&&(e=this.expression(),this.consume(":"))?(r=this.expression(),{type:le.ConditionalExpression,test:t,alternate:e,consequent:r}):t},logicalOR:function(){for(var t=this.logicalAND();this.expect("||");)t={type:le.LogicalExpression,operator:"||",left:t,right:this.logicalAND()};return t},logicalAND:function(){for(var t=this.equality();this.expect("&&");)t={type:le.LogicalExpression,operator:"&&",left:t,right:this.equality()};return t},equality:function(){for(var t=this.relational(),e;e=this.expect("==","!=","===","!==");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var t=this.additive(),e;e=this.expect("<",">","<=",">=");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var t=this.multiplicative(),e;e=this.expect("+","-");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var t=this.unary(),e;e=this.expect("*","/","%");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var t;return(t=this.expect("+","-","!"))?{type:le.UnaryExpression,operator:t.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?t=xae(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?t={type:le.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e;e=this.expect("(","[",".");)e.text==="("?(t={type:le.CallExpression,callee:t,arguments:this.parseArguments()},this.consume(")")):e.text==="["?(t={type:le.MemberExpression,object:t,property:this.expression(),computed:!0},this.consume("]")):e.text==="."?t={type:le.MemberExpression,object:t,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return t},filter:function(t){for(var e=[t],r={type:le.CallExpression,callee:this.identifier(),arguments:e,filter:!0};this.expect(":");)e.push(this.expression());return r},parseArguments:function(){var t=[];if(this.peekToken().text!==")")do t.push(this.filterChain());while(this.expect(","));return t},identifier:function(){var t=this.consume();return t.identifier||this.throwError("is not a valid identifier",t),{type:le.Identifier,name:t.text}},constant:function(){return{type:le.Literal,value:this.consume().value}},arrayDeclaration:function(){var t=[];if(this.peekToken().text!=="]")do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:le.ArrayExpression,elements:t}},object:function(){var t=[],e;if(this.peekToken().text!=="}")do{if(this.peek("}"))break;e={type:le.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:le.ObjectExpression,properties:t}},throwError:function(t,e){throw ll("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},consume:function(t){if(this.tokens.length===0)throw ll("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},peekToken:function(){if(this.tokens.length===0)throw ll("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,r,n){return this.peekAhead(0,t,e,r,n)},peekAhead:function(t,e,r,n,i){if(this.tokens.length>t){var a=this.tokens[t],o=a.text;if(o===e||o===r||o===n||o===i||!e&&!r&&!n&&!i)return a}return!1},expect:function(t,e,r,n){var i=this.peek(t,e,r,n);return i?(this.tokens.shift(),i):!1},selfReferential:{this:{type:le.ThisExpression},$locals:{type:le.LocalsExpression}}};function Aae(t,e){return typeof t<"u"?t:e}function WF(t,e){return typeof t>"u"?e:typeof e>"u"?t:t+e}function Cae(t,e){var r=t(e);if(!r)throw new Error("Filter '"+e+"' is not defined");return!r.$stateful}function Er(t,e){var r,n,i;switch(t.type){case le.Program:r=!0,Dt(t.body,function(a){Er(a.expression,e),r=r&&a.expression.constant}),t.constant=r;break;case le.Literal:t.constant=!0,t.toWatch=[];break;case le.UnaryExpression:Er(t.argument,e),t.constant=t.argument.constant,t.toWatch=t.argument.toWatch;break;case le.BinaryExpression:Er(t.left,e),Er(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.left.toWatch.concat(t.right.toWatch);break;case le.LogicalExpression:Er(t.left,e),Er(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.constant?[]:[t];break;case le.ConditionalExpression:Er(t.test,e),Er(t.alternate,e),Er(t.consequent,e),t.constant=t.test.constant&&t.alternate.constant&&t.consequent.constant,t.toWatch=t.constant?[]:[t];break;case le.Identifier:t.constant=!1,t.toWatch=[t];break;case le.MemberExpression:Er(t.object,e),t.computed&&Er(t.property,e),t.constant=t.object.constant&&(!t.computed||t.property.constant),t.toWatch=[t];break;case le.CallExpression:i=t.filter?Cae(e,t.callee.name):!1,r=i,n=[],Dt(t.arguments,function(a){Er(a,e),r=r&&a.constant,a.constant||n.push.apply(n,a.toWatch)}),t.constant=r,t.toWatch=i?n:[t];break;case le.AssignmentExpression:Er(t.left,e),Er(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=[t];break;case le.ArrayExpression:r=!0,n=[],Dt(t.elements,function(a){Er(a,e),r=r&&a.constant,a.constant||n.push.apply(n,a.toWatch)}),t.constant=r,t.toWatch=n;break;case le.ObjectExpression:r=!0,n=[],Dt(t.properties,function(a){Er(a.value,e),r=r&&a.value.constant&&!a.computed,a.value.constant||n.push.apply(n,a.value.toWatch)}),t.constant=r,t.toWatch=n;break;case le.ThisExpression:t.constant=!1,t.toWatch=[];break;case le.LocalsExpression:t.constant=!1,t.toWatch=[];break}}function YF(t){if(t.length===1){var e=t[0].expression,r=e.toWatch;return r.length!==1||r[0]!==e?r:void 0}}function HF(t){return t.type===le.Identifier||t.type===le.MemberExpression}function qF(t){if(t.body.length===1&&HF(t.body[0].expression))return{type:le.AssignmentExpression,left:t.body[0].expression,right:{type:le.NGValueParameter},operator:"="}}function KF(t){return t.body.length===0||t.body.length===1&&(t.body[0].expression.type===le.Literal||t.body[0].expression.type===le.ArrayExpression||t.body[0].expression.type===le.ObjectExpression)}function ZF(t){return t.constant}function QF(t,e){this.astBuilder=t,this.$filter=e}QF.prototype={compile:function(t){var e=this,r=this.astBuilder.ast(t);this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},Er(r,e.$filter);var n="",i;if(this.stage="assign",i=qF(r)){this.state.computing="assign";var a=this.nextId();this.recurse(i,a),this.return_(a),n="fn.assign="+this.generateFunction("assign","s,v,l")}var o=YF(r.body);e.stage="inputs",Dt(o,function(l,c){var f="fn"+c;e.state[f]={vars:[],body:[],own:{}},e.state.computing=f;var h=e.nextId();e.recurse(l,h),e.return_(h),e.state.inputs.push(f),l.watchId=c}),this.state.computing="fn",this.stage="main",this.recurse(r);var s='"'+this.USE+" "+this.STRICT+`"; -`+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+n+this.watchFns()+"return fn;",u=new Function("$filter","getStringValue","ifDefined","plus",s)(this.$filter,zF,Aae,WF);return this.state=this.stage=void 0,u.ast=r,u.literal=KF(r),u.constant=ZF(r),u},USE:"use",STRICT:"strict",watchFns:function(){var t=[],e=this.state.inputs,r=this;return Dt(e,function(n){t.push("var "+n+"="+r.generateFunction(n,"s"))}),e.length&&t.push("fn.inputs=["+e.join(",")+"];"),t.join("")},generateFunction:function(t,e){return"function("+e+"){"+this.varsPrefix(t)+this.body(t)+"};"},filterPrefix:function(){var t=[],e=this;return Dt(this.state.filters,function(r,n){t.push(r+"=$filter("+e.escape(n)+")")}),t.length?"var "+t.join(",")+";":""},varsPrefix:function(t){return this.state[t].vars.length?"var "+this.state[t].vars.join(",")+";":""},body:function(t){return this.state[t].body.join("")},recurse:function(t,e,r,n,i,a){var o,s,u=this,l,c,f;if(n=n||xS,!a&&sl(t.watchId)){e=e||this.nextId(),this.if_("i",this.lazyAssign(e,this.unsafeComputedMember("i",t.watchId)),this.lazyRecurse(t,e,r,n,i,!0));return}switch(t.type){case le.Program:Dt(t.body,function(d,p){u.recurse(d.expression,void 0,void 0,function(v){s=v}),p!==t.body.length-1?u.current().body.push(s,";"):u.return_(s)});break;case le.Literal:c=this.escape(t.value),this.assign(e,c),n(e||c);break;case le.UnaryExpression:this.recurse(t.argument,void 0,void 0,function(d){s=d}),c=t.operator+"("+this.ifDefined(s,0)+")",this.assign(e,c),n(c);break;case le.BinaryExpression:this.recurse(t.left,void 0,void 0,function(d){o=d}),this.recurse(t.right,void 0,void 0,function(d){s=d}),t.operator==="+"?c=this.plus(o,s):t.operator==="-"?c=this.ifDefined(o,0)+t.operator+this.ifDefined(s,0):c="("+o+")"+t.operator+"("+s+")",this.assign(e,c),n(c);break;case le.LogicalExpression:e=e||this.nextId(),u.recurse(t.left,e),u.if_(t.operator==="&&"?e:u.not(e),u.lazyRecurse(t.right,e)),n(e);break;case le.ConditionalExpression:e=e||this.nextId(),u.recurse(t.test,e),u.if_(e,u.lazyRecurse(t.alternate,e),u.lazyRecurse(t.consequent,e)),n(e);break;case le.Identifier:e=e||this.nextId();var h=u.current().inAssignment;r&&(h?r.context=this.assign(this.nextId(),"s"):r.context=u.stage==="inputs"?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",t.name)+"?l:s"),r.computed=!1,r.name=t.name),u.if_(u.stage==="inputs"||u.not(u.getHasOwnProperty("l",t.name)),function(){u.if_(u.stage==="inputs"||u.and_("s",u.or_(u.isNull(u.nonComputedMember("s",t.name)),u.hasOwnProperty_("s",t.name))),function(){i&&i!==1&&u.if_(u.isNull(u.nonComputedMember("s",t.name)),u.lazyAssign(u.nonComputedMember("s",t.name),"{}")),u.assign(e,u.nonComputedMember("s",t.name))})},e&&u.lazyAssign(e,u.nonComputedMember("l",t.name))),n(e);break;case le.MemberExpression:o=r&&(r.context=this.nextId())||this.nextId(),e=e||this.nextId(),u.recurse(t.object,o,void 0,function(){var d=null,p=u.current().inAssignment;t.computed?(s=u.nextId(),p||u.state.computing==="assign"?d=u.unsafeComputedMember(o,s):d=u.computedMember(o,s)):(p||u.state.computing==="assign"?d=u.unsafeNonComputedMember(o,t.property.name):d=u.nonComputedMember(o,t.property.name),s=t.property.name),t.computed&&t.property.type===le.Literal&&u.recurse(t.property,s),u.if_(u.and_(u.notNull(o),u.or_(u.isNull(d),u.hasOwnProperty_(o,s,t.computed))),function(){t.computed?(t.property.type!==le.Literal&&u.recurse(t.property,s),i&&i!==1&&u.if_(u.not(d),u.lazyAssign(d,"{}")),u.assign(e,d),r&&(r.computed=!0,r.name=s)):(i&&i!==1&&u.if_(u.isNull(d),u.lazyAssign(d,"{}")),u.assign(e,d),r&&(r.computed=!1,r.name=t.property.name))},function(){u.assign(e,"undefined")}),n(e)},!!i);break;case le.CallExpression:e=e||this.nextId(),t.filter?(s=u.filter(t.callee.name),l=[],Dt(t.arguments,function(d){var p=u.nextId();u.recurse(d,p),l.push(p)}),c=s+".call("+s+","+l.join(",")+")",u.assign(e,c),n(e)):(s=u.nextId(),o={},l=[],u.recurse(t.callee,s,o,function(){u.if_(u.notNull(s),function(){if(Dt(t.arguments,function(p){u.recurse(p,t.constant?void 0:u.nextId(),void 0,function(v){l.push(v)})}),o.name){var d=u.member(o.context,o.name,o.computed);c="("+d+" === null ? null : "+u.unsafeMember(o.context,o.name,o.computed)+".call("+[o.context].concat(l).join(",")+"))"}else c=s+"("+l.join(",")+")";u.assign(e,c)},function(){u.assign(e,"undefined")}),n(e)}));break;case le.AssignmentExpression:s=this.nextId(),o={},u.current().inAssignment=!0,this.recurse(t.left,void 0,o,function(){u.if_(u.and_(u.notNull(o.context),u.or_(u.hasOwnProperty_(o.context,o.name),u.isNull(u.member(o.context,o.name,o.computed)))),function(){u.recurse(t.right,s),c=u.member(o.context,o.name,o.computed)+t.operator+s,u.assign(e,c),n(e||c)}),u.current().inAssignment=!1,u.recurse(t.right,s),u.current().inAssignment=!0},1),u.current().inAssignment=!1;break;case le.ArrayExpression:l=[],Dt(t.elements,function(d){u.recurse(d,t.constant?void 0:u.nextId(),void 0,function(p){l.push(p)})}),c="["+l.join(",")+"]",this.assign(e,c),n(e||c);break;case le.ObjectExpression:l=[],f=!1,Dt(t.properties,function(d){d.computed&&(f=!0)}),f?(e=e||this.nextId(),this.assign(e,"{}"),Dt(t.properties,function(d){d.computed?(o=u.nextId(),u.recurse(d.key,o)):o=d.key.type===le.Identifier?d.key.name:""+d.key.value,s=u.nextId(),u.recurse(d.value,s),u.assign(u.unsafeMember(e,o,d.computed),s)})):(Dt(t.properties,function(d){u.recurse(d.value,t.constant?void 0:u.nextId(),void 0,function(p){l.push(u.escape(d.key.type===le.Identifier?d.key.name:""+d.key.value)+":"+p)})}),c="{"+l.join(",")+"}",this.assign(e,c)),n(e||c);break;case le.ThisExpression:this.assign(e,"s"),n(e||"s");break;case le.LocalsExpression:this.assign(e,"l"),n(e||"l");break;case le.NGValueParameter:this.assign(e,"v"),n(e||"v");break}},getHasOwnProperty:function(t,e){var r=t+"."+e,n=this.current().own;return n.hasOwnProperty(r)||(n[r]=this.nextId(!1,t+"&&("+this.escape(e)+" in "+t+")")),n[r]},assign:function(t,e){if(t)return this.current().body.push(t,"=",e,";"),t},filter:function(t){return this.state.filters.hasOwnProperty(t)||(this.state.filters[t]=this.nextId(!0)),this.state.filters[t]},ifDefined:function(t,e){return"ifDefined("+t+","+this.escape(e)+")"},plus:function(t,e){return"plus("+t+","+e+")"},return_:function(t){this.current().body.push("return ",t,";")},if_:function(t,e,r){if(t===!0)e();else{var n=this.current().body;n.push("if(",t,"){"),e(),n.push("}"),r&&(n.push("else{"),r(),n.push("}"))}},or_:function(t,e){return"("+t+") || ("+e+")"},hasOwnProperty_:function(t,e,r){return r?"(Object.prototype.hasOwnProperty.call("+t+","+e+"))":"(Object.prototype.hasOwnProperty.call("+t+",'"+e+"'))"},and_:function(t,e){return"("+t+") && ("+e+")"},not:function(t){return"!("+t+")"},isNull:function(t){return t+"==null"},notNull:function(t){return t+"!=null"},nonComputedMember:function(t,e){var r=/^[$_a-zA-Z][$_a-zA-Z0-9]*$/,n=/[^$_a-zA-Z0-9]/g,i="";return r.test(e)?i=t+"."+e:(e=e.replace(n,this.stringEscapeFn),i=t+'["'+e+'"]'),i},unsafeComputedMember:function(t,e){return t+"["+e+"]"},unsafeNonComputedMember:function(t,e){return this.nonComputedMember(t,e)},computedMember:function(t,e){return this.state.computing==="assign"?this.unsafeComputedMember(t,e):"("+t+".hasOwnProperty("+e+") ? "+t+"["+e+"] : null)"},unsafeMember:function(t,e,r){return r?this.unsafeComputedMember(t,e):this.unsafeNonComputedMember(t,e)},member:function(t,e,r){return r?this.computedMember(t,e):this.nonComputedMember(t,e)},getStringValue:function(t){this.assign(t,"getStringValue("+t+")")},lazyRecurse:function(t,e,r,n,i,a){var o=this;return function(){o.recurse(t,e,r,n,i,a)}},lazyAssign:function(t,e){var r=this;return function(){r.assign(t,e)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)},escape:function(t){if(qv(t))return"'"+t.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(bS(t))return t.toString();if(t===!0)return"true";if(t===!1)return"false";if(t===null)return"null";if(typeof t>"u")return"undefined";throw ll("esc","IMPOSSIBLE")},nextId:function(t,e){var r="v"+this.state.nextId++;return t||this.current().vars.push(r+(e?"="+e:"")),r},current:function(){return this.state[this.state.computing]}};function JF(t,e){this.astBuilder=t,this.$filter=e}JF.prototype={compile:function(t){var e=this,r=this.astBuilder.ast(t);Er(r,e.$filter);var n,i;(n=qF(r))&&(i=this.recurse(n));var a=YF(r.body),o;a&&(o=[],Dt(a,function(l,c){var f=e.recurse(l);l.input=f,o.push(f),l.watchId=c}));var s=[];Dt(r.body,function(l){s.push(e.recurse(l.expression))});var u=r.body.length===0?xS:r.body.length===1?s[0]:function(l,c){var f;return Dt(s,function(h){f=h(l,c)}),f};return i&&(u.assign=function(l,c,f){return i(l,f,c)}),o&&(u.inputs=o),u.ast=r,u.literal=KF(r),u.constant=ZF(r),u},recurse:function(t,e,r){var n,i,a=this,o;if(t.input)return this.inputs(t.input,t.watchId);switch(t.type){case le.Literal:return this.value(t.value,e);case le.UnaryExpression:return i=this.recurse(t.argument),this["unary"+t.operator](i,e);case le.BinaryExpression:return n=this.recurse(t.left),i=this.recurse(t.right),this["binary"+t.operator](n,i,e);case le.LogicalExpression:return n=this.recurse(t.left),i=this.recurse(t.right),this["binary"+t.operator](n,i,e);case le.ConditionalExpression:return this["ternary?:"](this.recurse(t.test),this.recurse(t.alternate),this.recurse(t.consequent),e);case le.Identifier:return a.identifier(t.name,e,r);case le.MemberExpression:return n=this.recurse(t.object,!1,!!r),t.computed||(i=t.property.name),t.computed&&(i=this.recurse(t.property)),t.computed?this.computedMember(n,i,e,r):this.nonComputedMember(n,i,e,r);case le.CallExpression:return o=[],Dt(t.arguments,function(s){o.push(a.recurse(s))}),t.filter&&(i=this.$filter(t.callee.name)),t.filter||(i=this.recurse(t.callee,!0)),t.filter?function(s,u,l,c){for(var f=[],h=0;h":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)>e(n,i,a,o);return r?{value:s}:s}},"binary<=":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)<=e(n,i,a,o);return r?{value:s}:s}},"binary>=":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)>=e(n,i,a,o);return r?{value:s}:s}},"binary&&":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)&&e(n,i,a,o);return r?{value:s}:s}},"binary||":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)||e(n,i,a,o);return r?{value:s}:s}},"ternary?:":function(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s)?e(i,a,o,s):r(i,a,o,s);return n?{value:u}:u}},value:function(t,e){return function(){return e?{context:void 0,name:void 0,value:t}:t}},identifier:function(t,e,r){return function(n,i,a,o){var s=i&&t in i?i:n;r&&r!==1&&s&&s[t]==null&&(s[t]={});var u=s?s[t]:void 0;return e?{context:s,name:t,value:u}:u}},computedMember:function(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s),l,c;return u!=null&&(l=e(i,a,o,s),l=zF(l),n&&n!==1&&u&&!u[l]&&(u[l]={}),Object.prototype.hasOwnProperty.call(u,l)&&(c=u[l])),r?{context:u,name:l,value:c}:c}},nonComputedMember:function(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s);n&&n!==1&&u&&u[e]==null&&(u[e]={});var l=void 0;return u!=null&&Object.prototype.hasOwnProperty.call(u,e)&&(l=u[e]),r?{context:u,name:e,value:l}:l}},inputs:function(t,e){return function(r,n,i,a){return a?a[e]:t(r,n,i)}}};var h_=function(e,r,n){this.lexer=e,this.$filter=r,this.options=n,this.ast=new le(e,n),this.astCompiler=n.csp?new JF(this.ast,r):new QF(this.ast,r)};h_.prototype={constructor:h_,parse:function(t){return this.astCompiler.compile(t)}};yS.Lexer=f_;yS.Parser=h_;var eN=yS,Pae={},Oae=eN.Lexer,Rae=eN.Parser;function wS(t,e){e=e||{};var r=e.filters||Pae,n=e.filters?e.cache||{}:wS.cache,i=e,a;if(typeof t!="string")throw new TypeError("src must be a string, instead saw '"+typeof t+"'");var o={csp:e.csp!=null?e.csp:!1,literals:e.literals!=null?e.literals:{true:!0,false:!1,null:null,undefined:void 0}},s=new Oae(i),u=new Rae(s,function(c){return r[c]},o);return n?(a=n[t],a||(a=n[t]=u.parse(t)),a):u.parse(t)}wS.cache=Object.create(null);var tN=wS;const Iae=t=>{let e=!1;t.args.forEach(n=>{n.key==="global"&&(e=!0)});let r;if(e?r=lW:r=Pk,t.content.match(/\s*=\s*/)){const n=t.content.split(/\s*=\s*/)[0],i=t.content.split(/\s*=\s*/)[1];if(i==="random()")te.dispatch(r({key:n,value:Math.random()}));else if(i.match(/[+\-*\/()]/)){const o=i.split(/([+\-*\/()])/g).map(u=>{if(!u.trim().match(/^[a-zA-Z_$][a-zA-Z0-9_.]*$/))return u;const l=fp(u.trim(),!0);return typeof l=="string"?`'${l}'`:l}).reduce((u,l)=>u+l,"");let s="";try{s=tN(o)()}catch(u){ge.error("expression compile error",u)}te.dispatch(r({key:n,value:s}))}else i.match(/true|false/)?(i.match(/true/)&&te.dispatch(r({key:n,value:!0})),i.match(/false/)&&te.dispatch(r({key:n,value:!1}))):i.length===0?te.dispatch(r({key:n,value:""})):isNaN(Number(i))?te.dispatch(r({key:n,value:fp(i,!0)})):te.dispatch(r({key:n,value:Number(i)}));e?(ge.debug("设置全局变量:",{key:n,value:te.getState().userData.globalGameVar[n]}),hp()):ge.debug("设置变量:",{key:n,value:te.getState().stage.GameVar[n]})}return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function kae(t){let e;const r=te.getState().stage,n=te.getState().userData,i={stage:r,userData:n};if(r.GameVar.hasOwnProperty(t))e=r.GameVar[t];else if(n.globalGameVar.hasOwnProperty(t))e=n.globalGameVar[t];else if(t.startsWith("$")){const a=t.replace("$","");e=Aee(i,a,void 0)}return e}function fp(t,e=!1){const r=kae(t);return r??(ge.warn("valueFromState result null, key = "+t),e?t:`{${t}}`)}const Mae=t=>{const e=te.getState().stage,r=te.getState().userData,n=te.dispatch,i={stageGameVar:e.GameVar,globalGameVar:r.globalGameVar};n(Ge({key:"showText",value:JSON.stringify(i)})),n(Ge({key:"showName",value:"展示变量"})),ge.debug("展示变量:",i),setTimeout(()=>{L.events.textSettle.emit()},0);const a=TS(),o=750-r.optionData.textSpeed*250;return{performName:a,duration:o,isHoldOn:!1,stopFunction:()=>{L.events.textSettle.emit()},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function it(t,e,r){return{scriptType:t,scriptFunction:e,...r}}const rN={};function Fae(t){const e={};for(const[r,n]of Object.entries(t))e[r]=rN[n.scriptType]={scriptString:r,...n};return e}const Nae=t=>{const{content:e}=t,r=e.split(",");for(const n of r){const i=n.split("->");if(i.length>=2){const a=i[0],o=i[1];te.dispatch(Tr.replaceUIlable([a,o]))}}return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},nN=Fae({intro:it(Qe.intro,iie),changeBg:it(Qe.changeBg,Xte),changeFigure:it(Qe.changeFigure,zte),miniAvatar:it(Qe.miniAvatar,oie,{next:!0}),changeScene:it(Qe.changeScene,Wte),choose:it(Qe.choose,Fne),end:it(Qe.end,Iie),bgm:it(Qe.bgm,o7,{next:!0}),playVideo:it(Qe.video,pie),setComplexAnimation:it(Qe.setComplexAnimation,yie),setFilter:it(Qe.setFilter,xie),pixiInit:it(Qe.pixiInit,Mie,{next:!0}),pixiPerform:it(Qe.pixi,hie,{next:!0}),label:it(Qe.label,aie,{next:!0}),jumpLabel:it(Qe.jumpLabel,kie),setVar:it(Qe.setVar,Iae,{next:!0}),showVars:it(Qe.showVars,Mae),unlockCg:it(Qe.unlockCg,Pie,{next:!0}),unlockBgm:it(Qe.unlockBgm,Cie,{next:!0}),say:it(Qe.say,fae),filmMode:it(Qe.filmMode,Dne,{next:!0}),callScene:it(Qe.callScene,MZ),setTextbox:it(Qe.setTextbox,Sie),setAnimation:it(Qe.setAnimation,vie),playEffect:it(Qe.playEffect,die,{next:!0}),setTempAnimation:it(Qe.setTempAnimation,bie),__commment:it(Qe.comment,Lne,{next:!0}),setTransform:it(Qe.setTransform,wie),setTransition:it(Qe.setTransition,Aie,{next:!0}),getUserInput:it(Qe.getUserInput,Xne),applyStyle:it(Qe.applyStyle,Nae,{next:!0})}),iN=Object.values(nN),Lae=iN.filter(t=>t.next).map(t=>t.scriptType),Kv=new a7(gW,Nn,Lae,iN),ca=(t,e,r)=>{const n=Kv.parse(t,e,r);return ge.info(`解析场景:${e},数据为:`,n),n},ES=t=>{var n;let e=mW;e=(((n=rN[t.command])==null?void 0:n.scriptFunction)??nN.say.scriptFunction)(t),e.arrangePerformPromise?e.arrangePerformPromise.then(i=>L.gameplay.performController.arrangeNewPerform(i,t)):L.gameplay.performController.arrangeNewPerform(e,t)},Dae=t=>{L.sceneManager.lockSceneWrite||(L.sceneManager.lockSceneWrite=!0,ua(t.sceneUrl).then(e=>{L.sceneManager.sceneData.currentScene=ca(e,t.sceneName,t.sceneUrl),L.sceneManager.sceneData.currentSentenceId=t.continueLine+1,ge.debug("现在恢复场景,恢复后场景:",L.sceneManager.sceneData.currentScene),L.sceneManager.lockSceneWrite=!1,tn()}).catch(e=>{ge.error("场景调用错误",e),L.sceneManager.lockSceneWrite=!1}))};function Bae(t){try{return tN(t)()}catch{return!1}}const d_=t=>{if(t===void 0)return!0;const r=t.split(/([+\-*\/()>=|<=|==|&&|\|\||!=)/g).map(n=>n.match(/[a-zA-Z]/)?n.match(/true/)||n.match(/false/)?n:fp(n,!0):n).reduce((n,i)=>n+i,"");return!!Bae(r)},aN=()=>{if(L.sceneManager.sceneData.currentSentenceId>L.sceneManager.sceneData.currentScene.sentenceList.length-1){if(L.sceneManager.sceneData.sceneStack.length!==0){const l=L.sceneManager.sceneData.sceneStack.pop();l!==void 0&&Dae(l)}return}const t=L.sceneManager.sceneData.currentScene.sentenceList[L.sceneManager.sceneData.currentSentenceId],e=l=>{let c=l;const f=c.match(new RegExp("(?{const d=fp(h.replace(new RegExp("(?{t.content=e(t.content),t.args.forEach(l=>{l.value&&typeof l.value=="string"&&(l.value=e(l.value))})})();let n=!0,i=!1,a="";if(t.args.forEach(l=>{l.key==="when"&&(i=!0,a=l.value.toString())}),i&&(n=d_(a)),!n){ge.warn("不满足条件,跳过本句!"),L.sceneManager.sceneData.currentSentenceId++,tn();return}ES(t);let o=!1;t.args.forEach(l=>{l.key==="next"&&l.value&&(o=!0)});let s=t.command===Qe.say;t.args.forEach(l=>{l.key==="notend"&&l.value===!0&&(s=!1)});let u;if(o){L.sceneManager.sceneData.currentSentenceId++,aN();return}setTimeout(()=>{u=te.getState().stage;const l={currentStageState:u,globalGameVar:te.getState().userData.globalGameVar};ge.debug("本条语句执行结果",l),s&&L.backlogManager.saveCurrentStateToBacklog()},0),L.sceneManager.sceneData.currentSentenceId++},tn=()=>{if(L.events.userInteractNext.emit(),te.getState().GUI.showTitle)return;let e=!1;if(L.gameplay.performController.performList.forEach(i=>{i.blockingNext()&&(e=!0)}),e){ge.warn("next 被阻塞!");return}let r=!0;if(L.gameplay.performController.performList.forEach(i=>{!i.isHoldOn&&!i.skipNextCollect&&(r=!1)}),r){const i=te.getState().stage,a=Jt(i);for(let o=0;oMath.random().toString().substring(0,10);class jae{constructor(){Ae(this,"performList",[]);Ae(this,"timeoutList",[])}arrangeNewPerform(e,r,n=!0){if(e.performName!=="none"){if(n){const i={id:e.performName,isHoldOn:e.isHoldOn,script:r};te.dispatch(Tr.addPerform(i))}e.stopTimeout=setTimeout(()=>{e.isHoldOn||this.unmountPerform(e.performName)},e.duration),r.args.find(i=>i.key==="continue"&&i.value===!0)&&(e.goNextWhenOver=!0),this.performList.push(e)}}unmountPerform(e,r=!1){if(r)for(let n=0;n{n.blockingAuto()&&(e=!0)}),e?setTimeout(this.goNextWhenOver,100):tn()}}class Uae{constructor(){Ae(this,"isAuto",!1);Ae(this,"isFast",!1);Ae(this,"autoInterval",null);Ae(this,"fastInterval",null);Ae(this,"autoTimeout",null);Ae(this,"pixiStage",null);Ae(this,"performController",new jae)}resetGamePlay(){this.performController.timeoutList=[],this.isAuto=!1,this.isFast=!1;const e=this.autoInterval;e!==null&&clearInterval(e),this.autoInterval=null;const r=this.fastInterval;r!==null&&clearInterval(r),this.fastInterval=null;const n=this.autoTimeout;n!==null&&clearInterval(n),this.autoTimeout=null}}function $ae(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(i){i(r)}),(n=t.get("*"))&&n.slice().map(function(i){i(e,r)})}}}class Vae{constructor(){Ae(this,"textSettle",_h("text-settle"));Ae(this,"userInteractNext",_h("__NEXT"));Ae(this,"fullscreenDbClick",_h("fullscreen-dbclick"));Ae(this,"styleUpdate",_h("style-update"))}}const Kg=$ae();function _h(t){return{on:(e,r)=>{Kg.on(`${t}-${r??""}`,e)},emit:(e,r)=>{Kg.emit(`${t}-${r??""}`,e)},off:(e,r)=>{Kg.off(`${t}-${r??""}`,e)}}}class Gae{constructor(){Ae(this,"sceneManager",new pW);Ae(this,"backlogManager",new dW(this.sceneManager));Ae(this,"animationManager",new vW);Ae(this,"gameplay",new Uae);Ae(this,"gameName","");Ae(this,"gameKey","");Ae(this,"events",new Vae)}}const L=new Gae,st=oN(()=>{const t=te.getState().userData;ms.setItem(L.gameKey,t).then(()=>{ge.info("写入本地存储")})},100),Jc=oN(()=>{ms.getItem(L.gameKey).then(t=>{if(!t||!sN(t)){ge.warn("现在重置数据"),st();return}te.dispatch(Bb(t))})},100);function oN(t,e){let r;function n(...i){clearTimeout(r);let a;return r=setTimeout(()=>{a=t.apply(n,i)},e),a}return n}const hp=()=>{const t=te.getState().userData;ms.setItem(L.gameKey,t).then(()=>{ms.getItem(L.gameKey).then(e=>{if(!e){st();return}te.dispatch(Bb(e))}),ge.info("同步本地存储")})};function sN(t){let e=!0;for(const r in K0)t.hasOwnProperty(r)||(e=!1);return e}async function lN(){const t=await ms.getItem(L.gameKey);if(!t||!sN(t)){const e=te.getState().userData;return ge.warn("现在重置数据"),await ms.setItem(L.gameKey,e)}else te.dispatch(Bb(t))}var vt=(t=>(t[t.Save=0]="Save",t[t.Load=1]="Load",t[t.Option=2]="Option",t))(vt||{});const Xae={showBacklog:!1,showStarter:!0,showTitle:!0,showMenuPanel:!1,showTextBox:!0,showControls:!0,controlsVisibility:!0,currentMenuTag:vt.Option,titleBg:"",titleBgm:"",logoImage:[],showExtra:!1,showGlobalDialog:!1,showPanicOverlay:!1,isEnterGame:!1,isShowLogo:!0},uN=Qp({name:"gui",initialState:Xae,reducers:{setVisibility:(t,e)=>{Jc();const{component:r,visibility:n}=e.payload;t[r]=n},setMenuPanelTag:(t,e)=>{Jc(),t.currentMenuTag=e.payload},setGuiAsset:(t,e)=>{const{asset:r,value:n}=e.payload;t[r]=n},setLogoImage:(t,e)=>{t.logoImage=[...e.payload]}}}),{setVisibility:rt,setMenuPanelTag:ss,setGuiAsset:dp,setLogoImage:zae}=uN.actions,Wae=uN.reducer,te=TU({reducer:{stage:rz,GUI:Wae,userData:fW,saveData:Rie},middleware:tk({serializableCheck:!1})});let IP;function AS(t,e=0,r=100){if(ge.debug("playing bgm"+t),t===""){IP=setTimeout(()=>{te.dispatch(Ge({key:"bgm",value:{src:"",enter:0,volume:100}}))},e);const n=te.getState().stage.bgm.src;te.dispatch(Ge({key:"bgm",value:{src:n,enter:-e,volume:r}}))}else clearTimeout(IP),te.dispatch(Ge({key:"bgm",value:{src:t,enter:e,volume:r}}));setTimeout(()=>{const n=document.getElementById("currentBgm");n.src&&(n==null||n.play())},0)}function Wf(t){const e=document.getElementById("ebg");e&&(e.style.backgroundImage=`url("${t}")`)}const CS=()=>{ge.warn("清除所有演出");for(let t=0;t{te.getState().stage.PerformList.forEach(e=>{ES(e.script)})},cN=(t,e=!0)=>{const r=te.dispatch,n=L.backlogManager.getBacklog()[t];ge.debug("读取的backlog数据",n),e&&ua(n.saveScene.sceneUrl).then(a=>{L.sceneManager.sceneData.currentScene=ca(a,n.saveScene.sceneName,n.saveScene.sceneUrl);const o=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(L.sceneManager.sceneData.currentScene.sceneUrl);const s=jf(o);Uf(s)}),L.sceneManager.sceneData.currentSentenceId=n.saveScene.currentSentenceId,L.sceneManager.sceneData.sceneStack=Jt(n.saveScene.sceneStack),CS();for(let a=L.backlogManager.getBacklog().length-1;a>t;a--)L.backlogManager.getBacklog().pop();L.backlogManager.isSaveBacklogNext=!0;const i=Jt(n.currentStageState);r(ov(i)),setTimeout(PS,0),r(rt({component:"showBacklog",visibility:!1})),r(rt({component:"showTextBox",visibility:!0}))},fN=t=>{const r=te.getState().saveData.saveData[t];ge.debug("读取的存档数据",r),hN(r)};function hN(t){if(!t){ge.info("暂无存档");return}const e=t;ua(e.sceneData.sceneUrl).then(a=>{L.sceneManager.sceneData.currentScene=ca(a,e.sceneData.sceneName,e.sceneData.sceneUrl);const o=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(L.sceneManager.sceneData.currentScene.sceneUrl);const s=jf(o);Uf(s)}),L.sceneManager.sceneData.currentSentenceId=e.sceneData.currentSentenceId,L.sceneManager.sceneData.sceneStack=Jt(e.sceneData.sceneStack),CS();const r=e.backlog;L.backlogManager.getBacklog().splice(0,L.backlogManager.getBacklog().length);for(const a of r)L.backlogManager.getBacklog().push(a);const n=Jt(e.nowStageState),i=te.dispatch;i(ov(n)),setTimeout(PS,0),i(rt({component:"showTitle",visibility:!1})),i(rt({component:"showMenuPanel",visibility:!1})),Wf(te.getState().stage.bgName)}function yd(t,e){for(let r=t;r<=e;r++){const n=te.getState().saveData.saveData[r];Os.setItem(`${L.gameKey}-saves${r}`,n).then(()=>{ge.info(`存档${r}写入本地存储`)})}}function Zv(t,e){for(let r=t;r<=e;r++)Os.getItem(`${L.gameKey}-saves${r}`).then(n=>{te.dispatch(Oa.saveGame({index:r,saveData:n})),ge.info(`存档${r}读取自本地存储`)})}async function _d(){const t=te.getState().saveData.quickSaveData;await Os.setItem(`${L.gameKey}-saves-fast`,t),ge.info("快速存档写入本地存储")}async function OS(){const t=await Os.getItem(`${L.gameKey}-saves-fast`);te.dispatch(Oa.setFastSave(t)),ge.info("快速存档读取自本地存储")}const p_=t=>{const e=dN(t);te.dispatch(Oa.saveGame({index:t,saveData:e})),yd(t,t)};function dN(t,e=!0){const r=te.getState().stage,n=Jt(L.backlogManager.getBacklog());let i="";if(e){const o=document.getElementById("pixiCanvas"),s=document.createElement("canvas"),u=s.getContext("2d");s.width=480,s.height=270,u.drawImage(o,0,0,480,270),i=s.toDataURL("image/webp",.5),s.remove()}return{nowStageState:Jt(r),backlog:n,index:t,saveTime:new Date().toLocaleDateString()+" "+new Date().toLocaleTimeString("chinese",{hour12:!1}),sceneData:{currentSentenceId:L.sceneManager.sceneData.currentSentenceId,sceneStack:Jt(L.sceneManager.sceneData.sceneStack),sceneName:L.sceneManager.sceneData.currentScene.sceneName,sceneUrl:L.sceneManager.sceneData.currentScene.sceneUrl},previewImage:i}}function Yae(){`${L.gameName}${L.gameKey}`,`${L.gameName}${L.gameKey}`}async function Hae(){const t=dN(-1,!1),e=Jt(t);te.dispatch(Oa.setFastSave(e)),await _d()}async function qae(){return await lN(),te.getState().saveData.quickSaveData!==null}async function Kae(){await OS();const t=te.getState().saveData.quickSaveData;t&&hN(t)}const Zae=()=>{mS(!0);const t=Nn("start.txt",Fn.scene);ua(t).then(e=>{L.sceneManager.sceneData.currentScene=ca(e,"start.txt",t),tn()}),te.dispatch(rt({component:"showTitle",visibility:!1}))};async function Qae(){if(Wf(te.getState().stage.bgName),await qae()&&L.sceneManager.sceneData.currentSentenceId===0){await Kae();return}L.sceneManager.sceneData.currentSentenceId===0&&L.sceneManager.sceneData.currentScene.sceneName==="start.txt"?tn():PS()}function RS(t,e){if(t==null)return{};var r=Cre(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var Jae={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const eoe=gn(Jae);var toe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function kP(t){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},r=t.match(/<\/?([^\s]+?)[/\s>]/);if(r&&(e.name=r[1],(eoe[r[1]]||t.charAt(t.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var n=t.indexOf("-->");return{type:"comment",comment:n!==-1?t.slice(4,n):""}}for(var i=new RegExp(toe),a=null;(a=i.exec(t))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),e.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(e.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return e}var roe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,noe=/^\s*$/,ioe=Object.create(null);function pN(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(r){var n=[];for(var i in r)n.push(i+'="'+r[i]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(pN,"")+"";case"comment":return t+""}}var aoe={parse:function(t,e){e||(e={}),e.components||(e.components=ioe);var r,n=[],i=[],a=-1,o=!1;if(t.indexOf("<")!==0){var s=t.indexOf("<");n.push({type:"text",content:s===-1?t:t.substring(0,s)})}return t.replace(roe,function(u,l){if(o){if(u!=="")return;o=!1}var c,f=u.charAt(1)!=="/",h=u.startsWith("");return{type:"comment",comment:n!==-1?t.slice(4,n):""}}for(var i=new RegExp(toe),a=null;(a=i.exec(t))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),e.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(e.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return e}var roe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,noe=/^\s*$/,ioe=Object.create(null);function pN(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(r){var n=[];for(var i in r)n.push(i+'="'+r[i]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(pN,"")+"";case"comment":return t+""}}var aoe={parse:function(t,e){e||(e={}),e.components||(e.components=ioe);var r,n=[],i=[],a=-1,o=!1;if(t.indexOf("<")!==0){var s=t.indexOf("<");n.push({type:"text",content:s===-1?t:t.substring(0,s)})}return t.replace(roe,function(u,l){if(o){if(u!=="")return;o=!1}var c,f=u.charAt(1)!=="/",h=u.startsWith(" WebGAL - + From a62bc53364eba705c95c246ea228cd80f7210152 Mon Sep 17 00:00:00 2001 From: Mahiru Date: Mon, 4 Nov 2024 21:20:28 +0800 Subject: [PATCH 3/4] fix: engine problem 4.5.9 --- .../{index-338efd63.js => index-cbe8d2e0.js} | 448 +++++++++--------- ...r-8a9071ee.js => initRegister-c9e825dd.js} | 2 +- .../templates/WebGAL_Template/index.html | 2 +- 3 files changed, 226 insertions(+), 226 deletions(-) rename packages/terre2/assets/templates/WebGAL_Template/assets/{index-338efd63.js => index-cbe8d2e0.js} (79%) rename packages/terre2/assets/templates/WebGAL_Template/assets/{initRegister-8a9071ee.js => initRegister-c9e825dd.js} (95%) diff --git a/packages/terre2/assets/templates/WebGAL_Template/assets/index-338efd63.js b/packages/terre2/assets/templates/WebGAL_Template/assets/index-cbe8d2e0.js similarity index 79% rename from packages/terre2/assets/templates/WebGAL_Template/assets/index-338efd63.js rename to packages/terre2/assets/templates/WebGAL_Template/assets/index-cbe8d2e0.js index 1d7dd9eb8..053414924 100644 --- a/packages/terre2/assets/templates/WebGAL_Template/assets/index-338efd63.js +++ b/packages/terre2/assets/templates/WebGAL_Template/assets/index-cbe8d2e0.js @@ -1,56 +1,56 @@ -var MB=Object.defineProperty;var FB=(t,e,r)=>e in t?MB(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Ae=(t,e,r)=>(FB(t,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Qn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function NB(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var KO={exports:{}},Pf={};/* +var FB=Object.defineProperty;var NB=(t,e,r)=>e in t?FB(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Ae=(t,e,r)=>(NB(t,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Qn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function LB(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var ZO={exports:{}},Pf={};/* object-assign (c) Sindre Sorhus @license MIT -*/var UE=Object.getOwnPropertySymbols,LB=Object.prototype.hasOwnProperty,DB=Object.prototype.propertyIsEnumerable;function BB(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function jB(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(e).map(function(a){return e[a]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var v1=jB()?Object.assign:function(t,e){for(var r,n=BB(t),i,a=1;a"u"||typeof MessageChannel!="function"){var u=null,l=null,c=function(){if(u!==null)try{var F=t.unstable_now();u(!0,F),u=null}catch(G){throw setTimeout(c,0),G}};e=function(F){u!==null?setTimeout(e,0,F):(u=F,setTimeout(c,0))},r=function(F,G){l=setTimeout(F,G)},n=function(){clearTimeout(l)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,h=window.clearTimeout;if(typeof console<"u"){var d=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof d!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var p=!1,v=null,g=-1,m=5,y=0;t.unstable_shouldYield=function(){return t.unstable_now()>=y},i=function(){},t.unstable_forceFrameRate=function(F){0>F||125>>1,H=F[U];if(H!==void 0&&0E(ie,V))pe!==void 0&&0>E(pe,ie)?(F[U]=pe,F[ae]=V,U=ae):(F[U]=ie,F[ee]=V,U=ee);else if(pe!==void 0&&0>E(pe,V))F[U]=pe,F[ae]=V,U=ae;else break e}}return G}return null}function E(F,G){var V=F.sortIndex-G.sortIndex;return V!==0?V:F.id-G.id}var T=[],A=[],O=1,P=null,k=3,M=!1,B=!1,j=!1;function z(F){for(var G=S(A);G!==null;){if(G.callback===null)w(A);else if(G.startTime<=F)w(A),G.sortIndex=G.expirationTime,b(T,G);else break;G=S(A)}}function J(F){if(j=!1,z(F),!B)if(S(T)!==null)B=!0,e(Z);else{var G=S(A);G!==null&&r(J,G.startTime-F)}}function Z(F,G){B=!1,j&&(j=!1,n()),M=!0;var V=k;try{for(z(G),P=S(T);P!==null&&(!(P.expirationTime>G)||F&&!t.unstable_shouldYield());){var U=P.callback;if(typeof U=="function"){P.callback=null,k=P.priorityLevel;var H=U(P.expirationTime<=G);G=t.unstable_now(),typeof H=="function"?P.callback=H:P===S(T)&&w(T),z(G)}else w(T);P=S(T)}if(P!==null)var ee=!0;else{var ie=S(A);ie!==null&&r(J,ie.startTime-G),ee=!1}return ee}finally{P=null,k=V,M=!1}}var $=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(F){F.callback=null},t.unstable_continueExecution=function(){B||M||(B=!0,e(Z))},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_getFirstCallbackNode=function(){return S(T)},t.unstable_next=function(F){switch(k){case 1:case 2:case 3:var G=3;break;default:G=k}var V=k;k=G;try{return F()}finally{k=V}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=$,t.unstable_runWithPriority=function(F,G){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var V=k;k=F;try{return G()}finally{k=V}},t.unstable_scheduleCallback=function(F,G,V){var U=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0U?(F.sortIndex=V,b(A,F),S(T)===null&&F===S(A)&&(j?n():j=!0,r(J,V-U))):(F.sortIndex=H,b(T,F),B||M||(B=!0,e(Z))),F},t.unstable_wrapCallback=function(F){var G=k;return function(){var V=k;k=G;try{return F.apply(this,arguments)}finally{k=V}}}})(vR);pR.exports=vR;var KB=pR.exports;/** @license React v17.0.2 + */(function(t){var e,r,n,i;if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}if(typeof window>"u"||typeof MessageChannel!="function"){var u=null,l=null,c=function(){if(u!==null)try{var F=t.unstable_now();u(!0,F),u=null}catch(G){throw setTimeout(c,0),G}};e=function(F){u!==null?setTimeout(e,0,F):(u=F,setTimeout(c,0))},r=function(F,G){l=setTimeout(F,G)},n=function(){clearTimeout(l)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,h=window.clearTimeout;if(typeof console<"u"){var d=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof d!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var p=!1,v=null,g=-1,m=5,y=0;t.unstable_shouldYield=function(){return t.unstable_now()>=y},i=function(){},t.unstable_forceFrameRate=function(F){0>F||125>>1,H=F[U];if(H!==void 0&&0E(ie,V))pe!==void 0&&0>E(pe,ie)?(F[U]=pe,F[ae]=V,U=ae):(F[U]=ie,F[ee]=V,U=ee);else if(pe!==void 0&&0>E(pe,V))F[U]=pe,F[ae]=V,U=ae;else break e}}return G}return null}function E(F,G){var V=F.sortIndex-G.sortIndex;return V!==0?V:F.id-G.id}var T=[],A=[],O=1,P=null,k=3,M=!1,B=!1,j=!1;function z(F){for(var G=S(A);G!==null;){if(G.callback===null)w(A);else if(G.startTime<=F)w(A),G.sortIndex=G.expirationTime,b(T,G);else break;G=S(A)}}function J(F){if(j=!1,z(F),!B)if(S(T)!==null)B=!0,e(Z);else{var G=S(A);G!==null&&r(J,G.startTime-F)}}function Z(F,G){B=!1,j&&(j=!1,n()),M=!0;var V=k;try{for(z(G),P=S(T);P!==null&&(!(P.expirationTime>G)||F&&!t.unstable_shouldYield());){var U=P.callback;if(typeof U=="function"){P.callback=null,k=P.priorityLevel;var H=U(P.expirationTime<=G);G=t.unstable_now(),typeof H=="function"?P.callback=H:P===S(T)&&w(T),z(G)}else w(T);P=S(T)}if(P!==null)var ee=!0;else{var ie=S(A);ie!==null&&r(J,ie.startTime-G),ee=!1}return ee}finally{P=null,k=V,M=!1}}var $=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(F){F.callback=null},t.unstable_continueExecution=function(){B||M||(B=!0,e(Z))},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_getFirstCallbackNode=function(){return S(T)},t.unstable_next=function(F){switch(k){case 1:case 2:case 3:var G=3;break;default:G=k}var V=k;k=G;try{return F()}finally{k=V}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=$,t.unstable_runWithPriority=function(F,G){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var V=k;k=F;try{return G()}finally{k=V}},t.unstable_scheduleCallback=function(F,G,V){var U=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0U?(F.sortIndex=V,b(A,F),S(T)===null&&F===S(A)&&(j?n():j=!0,r(J,V-U))):(F.sortIndex=H,b(T,F),B||M||(B=!0,e(Z))),F},t.unstable_wrapCallback=function(F){var G=k;return function(){var V=k;k=G;try{return F.apply(this,arguments)}finally{k=V}}}})(mR);vR.exports=mR;var ZB=vR.exports;/** @license React v17.0.2 * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Bp=ne,Ft=v1,kr=KB;function he(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ZB=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,XE=Object.prototype.hasOwnProperty,zE={},WE={};function QB(t){return XE.call(WE,t)?!0:XE.call(zE,t)?!1:ZB.test(t)?WE[t]=!0:(zE[t]=!0,!1)}function JB(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function e4(t,e,r,n){if(e===null||typeof e>"u"||JB(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function yn(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var zr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){zr[t]=new yn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];zr[e]=new yn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){zr[t]=new yn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){zr[t]=new yn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){zr[t]=new yn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){zr[t]=new yn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){zr[t]=new yn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){zr[t]=new yn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){zr[t]=new yn(t,5,!1,t.toLowerCase(),null,!1,!1)});var b1=/[\-:]([a-z])/g;function S1(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(b1,S1);zr[e]=new yn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(b1,S1);zr[e]=new yn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(b1,S1);zr[e]=new yn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){zr[t]=new yn(t,1,!1,t.toLowerCase(),null,!1,!1)});zr.xlinkHref=new yn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){zr[t]=new yn(t,1,!1,t.toLowerCase(),null,!0,!0)});function w1(t,e,r,n){var i=zr.hasOwnProperty(e)?zr[e]:null,a=i!==null?i.type===0:n?!1:!(!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),QB=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zE=Object.prototype.hasOwnProperty,WE={},YE={};function JB(t){return zE.call(YE,t)?!0:zE.call(WE,t)?!1:QB.test(t)?YE[t]=!0:(WE[t]=!0,!1)}function e4(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function t4(t,e,r,n){if(e===null||typeof e>"u"||e4(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function yn(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var zr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){zr[t]=new yn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];zr[e]=new yn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){zr[t]=new yn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){zr[t]=new yn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){zr[t]=new yn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){zr[t]=new yn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){zr[t]=new yn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){zr[t]=new yn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){zr[t]=new yn(t,5,!1,t.toLowerCase(),null,!1,!1)});var S1=/[\-:]([a-z])/g;function w1(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(S1,w1);zr[e]=new yn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(S1,w1);zr[e]=new yn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(S1,w1);zr[e]=new yn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){zr[t]=new yn(t,1,!1,t.toLowerCase(),null,!1,!1)});zr.xlinkHref=new yn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){zr[t]=new yn(t,1,!1,t.toLowerCase(),null,!0,!0)});function E1(t,e,r,n){var i=zr.hasOwnProperty(e)?zr[e]:null,a=i!==null?i.type===0:n?!1:!(!(2s||i[o]!==a[s])return` -`+i[o].replace(" at new "," at ");while(1<=o&&0<=s);break}}}finally{Om=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ec(t):""}function t4(t){switch(t.tag){case 5:return ec(t.type);case 16:return ec("Lazy");case 13:return ec("Suspense");case 19:return ec("SuspenseList");case 0:case 2:case 15:return t=rh(t.type,!1),t;case 11:return t=rh(t.type.render,!1),t;case 22:return t=rh(t.type._render,!1),t;case 1:return t=rh(t.type,!0),t;default:return""}}function hl(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ha:return"Fragment";case qo:return"Portal";case uc:return"Profiler";case E1:return"StrictMode";case cc:return"Suspense";case Cd:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case A1:return(t.displayName||"Context")+".Consumer";case T1:return(t._context.displayName||"Context")+".Provider";case jp:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case Up:return hl(t.type);case P1:return hl(t._render);case C1:e=t._payload,t=t._init;try{return hl(t(e))}catch{}}return null}function yo(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function yR(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function r4(t){var e=yR(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function nh(t){t._valueTracker||(t._valueTracker=r4(t))}function _R(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=yR(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Pd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Jy(t,e){var r=e.checked;return Ft({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function HE(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=yo(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function xR(t,e){e=e.checked,e!=null&&w1(t,"checked",e,!1)}function e0(t,e){xR(t,e);var r=yo(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?t0(t,e.type,r):e.hasOwnProperty("defaultValue")&&t0(t,e.type,yo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function qE(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function t0(t,e,r){(e!=="number"||Pd(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}function n4(t){var e="";return Bp.Children.forEach(t,function(r){r!=null&&(e+=r)}),e}function r0(t,e){return t=Ft({children:void 0},e),(e=n4(e.children))&&(t.children=e),t}function dl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i=r.length))throw Error(he(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:yo(r)}}function bR(t,e){var r=yo(e.value),n=yo(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function ZE(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}var i0={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function SR(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function a0(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?SR(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var ih,wR=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!==i0.svg||"innerHTML"in t)t.innerHTML=e;else{for(ih=ih||document.createElement("div"),ih.innerHTML=""+e.valueOf().toString()+"",e=ih.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Rc(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var fc={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},i4=["Webkit","ms","Moz","O"];Object.keys(fc).forEach(function(t){i4.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),fc[e]=fc[t]})});function ER(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||fc.hasOwnProperty(t)&&fc[t]?(""+e).trim():e+"px"}function TR(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=ER(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var a4=Ft({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function o0(t,e){if(e){if(a4[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(he(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(he(60));if(!(typeof e.dangerouslySetInnerHTML=="object"&&"__html"in e.dangerouslySetInnerHTML))throw Error(he(61))}if(e.style!=null&&typeof e.style!="object")throw Error(he(62))}}function s0(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function I1(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var l0=null,pl=null,vl=null;function QE(t){if(t=If(t)){if(typeof l0!="function")throw Error(he(280));var e=t.stateNode;e&&(e=Wp(e),l0(t.stateNode,t.type,e))}}function AR(t){pl?vl?vl.push(t):vl=[t]:pl=t}function CR(){if(pl){var t=pl,e=vl;if(vl=pl=null,QE(t),e)for(t=0;tn?0:1<r;r++)e.push(t);return e}function Vp(t,e,r){t.pendingLanes|=e;var n=e-1;t.suspendedLanes&=n,t.pingedLanes&=n,t=t.eventTimes,e=31-_o(e),t[e]=r}var _o=Math.clz32?Math.clz32:b4,_4=Math.log,x4=Math.LN2;function b4(t){return t===0?32:31-(_4(t)/x4|0)|0}var S4=kr.unstable_UserBlockingPriority,w4=kr.unstable_runWithPriority,Jh=!0;function E4(t,e,r,n){Ko||M1();var i=B1,a=Ko;Ko=!0;try{PR(i,t,e,r,n)}finally{(Ko=a)||F1()}}function T4(t,e,r,n){w4(S4,B1.bind(null,t,e,r,n))}function B1(t,e,r,n){if(Jh){var i;if((i=(e&4)===0)&&0=dc),lT=String.fromCharCode(32),uT=!1;function zR(t,e){switch(t){case"keyup":return H4.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WR(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var rl=!1;function K4(t,e){switch(t){case"compositionend":return WR(e);case"keypress":return e.which!==32?null:(uT=!0,lT);case"textInput":return t=e.data,t===lT&&uT?null:t;default:return null}}function Z4(t,e){if(rl)return t==="compositionend"||!G1&&zR(t,e)?(t=GR(),ed=U1=Za=null,rl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=dT(r)}}function KR(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?KR(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function vT(){for(var t=window,e=Pd();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Pd(t.document)}return e}function d0(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var sj=Fa&&"documentMode"in document&&11>=document.documentMode,nl=null,p0=null,vc=null,v0=!1;function mT(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;v0||nl==null||nl!==Pd(n)||(n=nl,"selectionStart"in n&&d0(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),vc&&Lc(vc,n)||(vc=n,n=kd(p0,"onSelect"),0al||(t.current=g0[al],g0[al]=null,al--)}function Xt(t,e){al++,g0[al]=t.current,t.current=e}var xo={},Jr=Oo(xo),An=Oo(!1),hs=xo;function kl(t,e){var r=t.type.contextTypes;if(!r)return xo;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Cn(t){return t=t.childContextTypes,t!=null}function Nd(){Rt(An),Rt(Jr)}function TT(t,e,r){if(Jr.current!==xo)throw Error(he(168));Xt(Jr,e),Xt(An,r)}function iI(t,e,r){var n=t.stateNode;if(t=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(he(108,hl(e)||"Unknown",i));return Ft({},r,n)}function rd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||xo,hs=Jr.current,Xt(Jr,t),Xt(An,An.current),!0}function AT(t,e,r){var n=t.stateNode;if(!n)throw Error(he(169));r?(t=iI(t,e,hs),n.__reactInternalMemoizedMergedChildContext=t,Rt(An),Rt(Jr),Xt(Jr,t)):Rt(An),Xt(An,r)}var z1=null,os=null,cj=kr.unstable_runWithPriority,W1=kr.unstable_scheduleCallback,y0=kr.unstable_cancelCallback,fj=kr.unstable_shouldYield,CT=kr.unstable_requestPaint,_0=kr.unstable_now,hj=kr.unstable_getCurrentPriorityLevel,Yp=kr.unstable_ImmediatePriority,aI=kr.unstable_UserBlockingPriority,oI=kr.unstable_NormalPriority,sI=kr.unstable_LowPriority,lI=kr.unstable_IdlePriority,Vm={},dj=CT!==void 0?CT:function(){},Ea=null,nd=null,Gm=!1,PT=_0(),Zr=1e4>PT?_0:function(){return _0()-PT};function Ml(){switch(hj()){case Yp:return 99;case aI:return 98;case oI:return 97;case sI:return 96;case lI:return 95;default:throw Error(he(332))}}function uI(t){switch(t){case 99:return Yp;case 98:return aI;case 97:return oI;case 96:return sI;case 95:return lI;default:throw Error(he(332))}}function ds(t,e){return t=uI(t),cj(t,e)}function Bc(t,e,r){return t=uI(t),W1(t,e,r)}function oa(){if(nd!==null){var t=nd;nd=null,y0(t)}cI()}function cI(){if(!Gm&&Ea!==null){Gm=!0;var t=0;try{var e=Ea;ds(99,function(){for(;tw?(E=S,S=null):E=S.sibling;var T=h(g,S,y[w],_);if(T===null){S===null&&(S=E);break}t&&S&&T.alternate===null&&e(g,S),m=a(T,m,w),b===null?x=T:b.sibling=T,b=T,S=E}if(w===y.length)return r(g,S),x;if(S===null){for(;ww?(E=S,S=null):E=S.sibling;var A=h(g,S,T.value,_);if(A===null){S===null&&(S=E);break}t&&S&&A.alternate===null&&e(g,S),m=a(A,m,w),b===null?x=A:b.sibling=A,b=A,S=E}if(T.done)return r(g,S),x;if(S===null){for(;!T.done;w++,T=y.next())T=f(g,T.value,_),T!==null&&(m=a(T,m,w),b===null?x=T:b.sibling=T,b=T);return x}for(S=n(g,S);!T.done;w++,T=y.next())T=d(S,g,w,T.value,_),T!==null&&(t&&T.alternate!==null&&S.delete(T.key===null?w:T.key),m=a(T,m,w),b===null?x=T:b.sibling=T,b=T);return t&&S.forEach(function(O){return e(g,O)}),x}return function(g,m,y,_){var x=typeof y=="object"&&y!==null&&y.type===Ha&&y.key===null;x&&(y=y.props.children);var b=typeof y=="object"&&y!==null;if(b)switch(y.$$typeof){case Ju:e:{for(b=y.key,x=m;x!==null;){if(x.key===b){switch(x.tag){case 7:if(y.type===Ha){r(g,x.sibling),m=i(x,y.props.children),m.return=g,g=m;break e}break;default:if(x.elementType===y.type){r(g,x.sibling),m=i(x,y.props),m.ref=ku(g,x,y),m.return=g,g=m;break e}}r(g,x);break}else e(g,x);x=x.sibling}y.type===Ha?(m=bl(y.props.children,g.mode,_,y.key),m.return=g,g=m):(_=sd(y.type,y.key,y.props,null,g.mode,_),_.ref=ku(g,m,y),_.return=g,g=_)}return o(g);case qo:e:{for(x=y.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){r(g,m.sibling),m=i(m,y.children||[]),m.return=g,g=m;break e}else{r(g,m);break}else e(g,m);m=m.sibling}m=qm(y,g.mode,_),m.return=g,g=m}return o(g)}if(typeof y=="string"||typeof y=="number")return y=""+y,m!==null&&m.tag===6?(r(g,m.sibling),m=i(m,y),m.return=g,g=m):(r(g,m),m=Hm(y,g.mode,_),m.return=g,g=m),o(g);if(sh(y))return p(g,m,y,_);if(Au(y))return v(g,m,y,_);if(b&&lh(g,y),typeof y>"u"&&!x)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(he(152,hl(g.type)||"Component"))}return r(g,m)}}var Ud=vI(!0),mI=vI(!1),kf={},Hi=Oo(kf),Uc=Oo(kf),$c=Oo(kf);function Qo(t){if(t===kf)throw Error(he(174));return t}function b0(t,e){switch(Xt($c,e),Xt(Uc,t),Xt(Hi,kf),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:a0(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=a0(e,t)}Rt(Hi),Xt(Hi,e)}function Fl(){Rt(Hi),Rt(Uc),Rt($c)}function MT(t){Qo($c.current);var e=Qo(Hi.current),r=a0(e,t.type);e!==r&&(Xt(Uc,t),Xt(Hi,r))}function K1(t){Uc.current===t&&(Rt(Hi),Rt(Uc))}var Gt=Oo(0);function $d(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&64)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ca=null,Ja=null,qi=!1;function gI(t,e){var r=Zn(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=e,r.return=t,r.flags=8,t.lastEffect!==null?(t.lastEffect.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r}function FT(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,!0):!1;case 13:return!1;default:return!1}}function S0(t){if(qi){var e=Ja;if(e){var r=e;if(!FT(t,e)){if(e=ml(r.nextSibling),!e||!FT(t,e)){t.flags=t.flags&-1025|2,qi=!1,Ca=t;return}gI(Ca,r)}Ca=t,Ja=ml(e.firstChild)}else t.flags=t.flags&-1025|2,qi=!1,Ca=t}}function NT(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Ca=t}function uh(t){if(t!==Ca)return!1;if(!qi)return NT(t),qi=!0,!1;var e=t.type;if(t.tag!==5||e!=="head"&&e!=="body"&&!m0(e,t.memoizedProps))for(e=Ja;e;)gI(t,e),e=ml(e.nextSibling);if(NT(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(he(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Ja=ml(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Ja=null}}else Ja=Ca?ml(t.stateNode.nextSibling):null;return!0}function Xm(){Ja=Ca=null,qi=!1}var yl=[];function Z1(){for(var t=0;ta))throw Error(he(301));a+=1,Vr=qr=null,e.updateQueue=null,mc.current=yj,t=r(n,i)}while(gc)}if(mc.current=Wd,e=qr!==null&&qr.next!==null,Vc=0,Vr=qr=Qt=null,Vd=!1,e)throw Error(he(300));return t}function Jo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vr===null?Qt.memoizedState=Vr=t:Vr=Vr.next=t,Vr}function As(){if(qr===null){var t=Qt.alternate;t=t!==null?t.memoizedState:null}else t=qr.next;var e=Vr===null?Qt.memoizedState:Vr.next;if(e!==null)Vr=e,qr=t;else{if(t===null)throw Error(he(310));qr=t,t={memoizedState:qr.memoizedState,baseState:qr.baseState,baseQueue:qr.baseQueue,queue:qr.queue,next:null},Vr===null?Qt.memoizedState=Vr=t:Vr=Vr.next=t}return Vr}function zi(t,e){return typeof e=="function"?e(t):e}function Mu(t){var e=As(),r=e.queue;if(r===null)throw Error(he(311));r.lastRenderedReducer=t;var n=qr,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){i=i.next,n=n.baseState;var s=o=a=null,u=i;do{var l=u.lane;if((Vc&l)===l)s!==null&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),n=u.eagerReducer===t?u.eagerState:t(n,u.action);else{var c={lane:l,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};s===null?(o=s=c,a=n):s=s.next=c,Qt.lanes|=l,Mf|=l}u=u.next}while(u!==null&&u!==i);s===null?a=n:s.next=o,Kn(n,e.memoizedState)||(yi=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=s,r.lastRenderedState=n}return[e.memoizedState,r.dispatch]}function Fu(t){var e=As(),r=e.queue;if(r===null)throw Error(he(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,a=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=t(a,o.action),o=o.next;while(o!==i);Kn(a,e.memoizedState)||(yi=!0),e.memoizedState=a,e.baseQueue===null&&(e.baseState=a),r.lastRenderedState=a}return[a,n]}function LT(t,e,r){var n=e._getVersion;n=n(e._source);var i=e._workInProgressVersionPrimary;if(i!==null?t=i===n:(t=t.mutableReadLanes,(t=(Vc&t)===t)&&(e._workInProgressVersionPrimary=n,yl.push(e))),t)return r(e._source);throw yl.push(e),Error(he(350))}function yI(t,e,r,n){var i=fn;if(i===null)throw Error(he(349));var a=e._getVersion,o=a(e._source),s=mc.current,u=s.useState(function(){return LT(i,e,r)}),l=u[1],c=u[0];u=Vr;var f=t.memoizedState,h=f.refs,d=h.getSnapshot,p=f.source;f=f.subscribe;var v=Qt;return t.memoizedState={refs:h,source:e,subscribe:n},s.useEffect(function(){h.getSnapshot=r,h.setSnapshot=l;var g=a(e._source);if(!Kn(o,g)){g=r(e._source),Kn(c,g)||(l(g),g=uo(v),i.mutableReadLanes|=g&i.pendingLanes),g=i.mutableReadLanes,i.entangledLanes|=g;for(var m=i.entanglements,y=g;0r?98:r,function(){t(!0)}),ds(97<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[Qa]=e,t[Fd]=n,CI(t,e,!1,!1),e.stateNode=t,o=s0(r,n),r){case"dialog":Tt("cancel",t),Tt("close",t),i=n;break;case"iframe":case"object":case"embed":Tt("load",t),i=n;break;case"video":case"audio":for(i=0;ik0&&(e.flags|=64,a=!0,Lu(n,!1),e.lanes=33554432)}else{if(!a)if(t=$d(o),t!==null){if(e.flags|=64,a=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Lu(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!qi)return e=e.lastEffect=n.lastEffect,e!==null&&(e.nextEffect=null),null}else 2*Zr()-n.renderingStartTime>k0&&r!==1073741824&&(e.flags|=64,a=!0,Lu(n,!1),e.lanes=33554432);n.isBackwards?(o.sibling=e.child,e.child=o):(r=n.last,r!==null?r.sibling=o:e.child=o,n.last=o)}return n.tail!==null?(r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=e.lastEffect,n.renderingStartTime=Zr(),r.sibling=null,e=Gt.current,Xt(Gt,a?e&1|2:e&1),r):null;case 23:case 24:return sb(),t!==null&&t.memoizedState!==null!=(e.memoizedState!==null)&&n.mode!=="unstable-defer-without-hiding"&&(e.flags|=4),null}throw Error(he(156,e.tag))}function bj(t){switch(t.tag){case 1:Cn(t.type)&&Nd();var e=t.flags;return e&4096?(t.flags=e&-4097|64,t):null;case 3:if(Fl(),Rt(An),Rt(Jr),Z1(),e=t.flags,e&64)throw Error(he(285));return t.flags=e&-4097|64,t;case 5:return K1(t),null;case 13:return Rt(Gt),e=t.flags,e&4096?(t.flags=e&-4097|64,t):null;case 19:return Rt(Gt),null;case 4:return Fl(),null;case 10:return H1(t),null;case 23:case 24:return sb(),null;default:return null}}function nb(t,e){try{var r="",n=e;do r+=t4(n),n=n.return;while(n);var i=r}catch(a){i=` +`+i[o].replace(" at new "," at ");while(1<=o&&0<=s);break}}}finally{Om=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ec(t):""}function r4(t){switch(t.tag){case 5:return ec(t.type);case 16:return ec("Lazy");case 13:return ec("Suspense");case 19:return ec("SuspenseList");case 0:case 2:case 15:return t=rh(t.type,!1),t;case 11:return t=rh(t.type.render,!1),t;case 22:return t=rh(t.type._render,!1),t;case 1:return t=rh(t.type,!0),t;default:return""}}function hl(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ha:return"Fragment";case qo:return"Portal";case uc:return"Profiler";case T1:return"StrictMode";case cc:return"Suspense";case Cd:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case C1:return(t.displayName||"Context")+".Consumer";case A1:return(t._context.displayName||"Context")+".Provider";case jp:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case Up:return hl(t.type);case O1:return hl(t._render);case P1:e=t._payload,t=t._init;try{return hl(t(e))}catch{}}return null}function yo(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function _R(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function n4(t){var e=_R(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function nh(t){t._valueTracker||(t._valueTracker=n4(t))}function xR(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=_R(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Pd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Jy(t,e){var r=e.checked;return Ft({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function qE(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=yo(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function bR(t,e){e=e.checked,e!=null&&E1(t,"checked",e,!1)}function e0(t,e){bR(t,e);var r=yo(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?t0(t,e.type,r):e.hasOwnProperty("defaultValue")&&t0(t,e.type,yo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function KE(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function t0(t,e,r){(e!=="number"||Pd(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}function i4(t){var e="";return Bp.Children.forEach(t,function(r){r!=null&&(e+=r)}),e}function r0(t,e){return t=Ft({children:void 0},e),(e=i4(e.children))&&(t.children=e),t}function dl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i=r.length))throw Error(he(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:yo(r)}}function SR(t,e){var r=yo(e.value),n=yo(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function QE(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}var i0={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function wR(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function a0(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?wR(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var ih,ER=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!==i0.svg||"innerHTML"in t)t.innerHTML=e;else{for(ih=ih||document.createElement("div"),ih.innerHTML=""+e.valueOf().toString()+"",e=ih.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Rc(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var fc={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},a4=["Webkit","ms","Moz","O"];Object.keys(fc).forEach(function(t){a4.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),fc[e]=fc[t]})});function TR(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||fc.hasOwnProperty(t)&&fc[t]?(""+e).trim():e+"px"}function AR(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=TR(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var o4=Ft({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function o0(t,e){if(e){if(o4[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(he(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(he(60));if(!(typeof e.dangerouslySetInnerHTML=="object"&&"__html"in e.dangerouslySetInnerHTML))throw Error(he(61))}if(e.style!=null&&typeof e.style!="object")throw Error(he(62))}}function s0(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function k1(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var l0=null,pl=null,vl=null;function JE(t){if(t=If(t)){if(typeof l0!="function")throw Error(he(280));var e=t.stateNode;e&&(e=Wp(e),l0(t.stateNode,t.type,e))}}function CR(t){pl?vl?vl.push(t):vl=[t]:pl=t}function PR(){if(pl){var t=pl,e=vl;if(vl=pl=null,JE(t),e)for(t=0;tn?0:1<r;r++)e.push(t);return e}function Vp(t,e,r){t.pendingLanes|=e;var n=e-1;t.suspendedLanes&=n,t.pingedLanes&=n,t=t.eventTimes,e=31-_o(e),t[e]=r}var _o=Math.clz32?Math.clz32:S4,x4=Math.log,b4=Math.LN2;function S4(t){return t===0?32:31-(x4(t)/b4|0)|0}var w4=kr.unstable_UserBlockingPriority,E4=kr.unstable_runWithPriority,Jh=!0;function T4(t,e,r,n){Ko||F1();var i=j1,a=Ko;Ko=!0;try{OR(i,t,e,r,n)}finally{(Ko=a)||N1()}}function A4(t,e,r,n){E4(w4,j1.bind(null,t,e,r,n))}function j1(t,e,r,n){if(Jh){var i;if((i=(e&4)===0)&&0=dc),uT=String.fromCharCode(32),cT=!1;function WR(t,e){switch(t){case"keyup":return q4.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YR(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var rl=!1;function Z4(t,e){switch(t){case"compositionend":return YR(e);case"keypress":return e.which!==32?null:(cT=!0,uT);case"textInput":return t=e.data,t===uT&&cT?null:t;default:return null}}function Q4(t,e){if(rl)return t==="compositionend"||!X1&&WR(t,e)?(t=XR(),ed=$1=Za=null,rl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pT(r)}}function ZR(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?ZR(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function mT(){for(var t=window,e=Pd();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Pd(t.document)}return e}function d0(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var lj=Fa&&"documentMode"in document&&11>=document.documentMode,nl=null,p0=null,vc=null,v0=!1;function gT(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;v0||nl==null||nl!==Pd(n)||(n=nl,"selectionStart"in n&&d0(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),vc&&Lc(vc,n)||(vc=n,n=kd(p0,"onSelect"),0al||(t.current=g0[al],g0[al]=null,al--)}function Xt(t,e){al++,g0[al]=t.current,t.current=e}var xo={},Jr=Oo(xo),An=Oo(!1),hs=xo;function kl(t,e){var r=t.type.contextTypes;if(!r)return xo;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Cn(t){return t=t.childContextTypes,t!=null}function Nd(){Rt(An),Rt(Jr)}function AT(t,e,r){if(Jr.current!==xo)throw Error(he(168));Xt(Jr,e),Xt(An,r)}function aI(t,e,r){var n=t.stateNode;if(t=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(he(108,hl(e)||"Unknown",i));return Ft({},r,n)}function rd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||xo,hs=Jr.current,Xt(Jr,t),Xt(An,An.current),!0}function CT(t,e,r){var n=t.stateNode;if(!n)throw Error(he(169));r?(t=aI(t,e,hs),n.__reactInternalMemoizedMergedChildContext=t,Rt(An),Rt(Jr),Xt(Jr,t)):Rt(An),Xt(An,r)}var W1=null,os=null,fj=kr.unstable_runWithPriority,Y1=kr.unstable_scheduleCallback,y0=kr.unstable_cancelCallback,hj=kr.unstable_shouldYield,PT=kr.unstable_requestPaint,_0=kr.unstable_now,dj=kr.unstable_getCurrentPriorityLevel,Yp=kr.unstable_ImmediatePriority,oI=kr.unstable_UserBlockingPriority,sI=kr.unstable_NormalPriority,lI=kr.unstable_LowPriority,uI=kr.unstable_IdlePriority,Vm={},pj=PT!==void 0?PT:function(){},Ea=null,nd=null,Gm=!1,OT=_0(),Zr=1e4>OT?_0:function(){return _0()-OT};function Ml(){switch(dj()){case Yp:return 99;case oI:return 98;case sI:return 97;case lI:return 96;case uI:return 95;default:throw Error(he(332))}}function cI(t){switch(t){case 99:return Yp;case 98:return oI;case 97:return sI;case 96:return lI;case 95:return uI;default:throw Error(he(332))}}function ds(t,e){return t=cI(t),fj(t,e)}function Bc(t,e,r){return t=cI(t),Y1(t,e,r)}function oa(){if(nd!==null){var t=nd;nd=null,y0(t)}fI()}function fI(){if(!Gm&&Ea!==null){Gm=!0;var t=0;try{var e=Ea;ds(99,function(){for(;tw?(E=S,S=null):E=S.sibling;var T=h(g,S,y[w],_);if(T===null){S===null&&(S=E);break}t&&S&&T.alternate===null&&e(g,S),m=a(T,m,w),b===null?x=T:b.sibling=T,b=T,S=E}if(w===y.length)return r(g,S),x;if(S===null){for(;ww?(E=S,S=null):E=S.sibling;var A=h(g,S,T.value,_);if(A===null){S===null&&(S=E);break}t&&S&&A.alternate===null&&e(g,S),m=a(A,m,w),b===null?x=A:b.sibling=A,b=A,S=E}if(T.done)return r(g,S),x;if(S===null){for(;!T.done;w++,T=y.next())T=f(g,T.value,_),T!==null&&(m=a(T,m,w),b===null?x=T:b.sibling=T,b=T);return x}for(S=n(g,S);!T.done;w++,T=y.next())T=d(S,g,w,T.value,_),T!==null&&(t&&T.alternate!==null&&S.delete(T.key===null?w:T.key),m=a(T,m,w),b===null?x=T:b.sibling=T,b=T);return t&&S.forEach(function(O){return e(g,O)}),x}return function(g,m,y,_){var x=typeof y=="object"&&y!==null&&y.type===Ha&&y.key===null;x&&(y=y.props.children);var b=typeof y=="object"&&y!==null;if(b)switch(y.$$typeof){case Ju:e:{for(b=y.key,x=m;x!==null;){if(x.key===b){switch(x.tag){case 7:if(y.type===Ha){r(g,x.sibling),m=i(x,y.props.children),m.return=g,g=m;break e}break;default:if(x.elementType===y.type){r(g,x.sibling),m=i(x,y.props),m.ref=ku(g,x,y),m.return=g,g=m;break e}}r(g,x);break}else e(g,x);x=x.sibling}y.type===Ha?(m=bl(y.props.children,g.mode,_,y.key),m.return=g,g=m):(_=sd(y.type,y.key,y.props,null,g.mode,_),_.ref=ku(g,m,y),_.return=g,g=_)}return o(g);case qo:e:{for(x=y.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){r(g,m.sibling),m=i(m,y.children||[]),m.return=g,g=m;break e}else{r(g,m);break}else e(g,m);m=m.sibling}m=qm(y,g.mode,_),m.return=g,g=m}return o(g)}if(typeof y=="string"||typeof y=="number")return y=""+y,m!==null&&m.tag===6?(r(g,m.sibling),m=i(m,y),m.return=g,g=m):(r(g,m),m=Hm(y,g.mode,_),m.return=g,g=m),o(g);if(sh(y))return p(g,m,y,_);if(Au(y))return v(g,m,y,_);if(b&&lh(g,y),typeof y>"u"&&!x)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(he(152,hl(g.type)||"Component"))}return r(g,m)}}var Ud=mI(!0),gI=mI(!1),kf={},Hi=Oo(kf),Uc=Oo(kf),$c=Oo(kf);function Qo(t){if(t===kf)throw Error(he(174));return t}function b0(t,e){switch(Xt($c,e),Xt(Uc,t),Xt(Hi,kf),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:a0(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=a0(e,t)}Rt(Hi),Xt(Hi,e)}function Fl(){Rt(Hi),Rt(Uc),Rt($c)}function FT(t){Qo($c.current);var e=Qo(Hi.current),r=a0(e,t.type);e!==r&&(Xt(Uc,t),Xt(Hi,r))}function Z1(t){Uc.current===t&&(Rt(Hi),Rt(Uc))}var Gt=Oo(0);function $d(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&64)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ca=null,Ja=null,qi=!1;function yI(t,e){var r=Zn(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=e,r.return=t,r.flags=8,t.lastEffect!==null?(t.lastEffect.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r}function NT(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,!0):!1;case 13:return!1;default:return!1}}function S0(t){if(qi){var e=Ja;if(e){var r=e;if(!NT(t,e)){if(e=ml(r.nextSibling),!e||!NT(t,e)){t.flags=t.flags&-1025|2,qi=!1,Ca=t;return}yI(Ca,r)}Ca=t,Ja=ml(e.firstChild)}else t.flags=t.flags&-1025|2,qi=!1,Ca=t}}function LT(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Ca=t}function uh(t){if(t!==Ca)return!1;if(!qi)return LT(t),qi=!0,!1;var e=t.type;if(t.tag!==5||e!=="head"&&e!=="body"&&!m0(e,t.memoizedProps))for(e=Ja;e;)yI(t,e),e=ml(e.nextSibling);if(LT(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(he(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Ja=ml(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Ja=null}}else Ja=Ca?ml(t.stateNode.nextSibling):null;return!0}function Xm(){Ja=Ca=null,qi=!1}var yl=[];function Q1(){for(var t=0;ta))throw Error(he(301));a+=1,Vr=qr=null,e.updateQueue=null,mc.current=_j,t=r(n,i)}while(gc)}if(mc.current=Wd,e=qr!==null&&qr.next!==null,Vc=0,Vr=qr=Jt=null,Vd=!1,e)throw Error(he(300));return t}function Jo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vr===null?Jt.memoizedState=Vr=t:Vr=Vr.next=t,Vr}function As(){if(qr===null){var t=Jt.alternate;t=t!==null?t.memoizedState:null}else t=qr.next;var e=Vr===null?Jt.memoizedState:Vr.next;if(e!==null)Vr=e,qr=t;else{if(t===null)throw Error(he(310));qr=t,t={memoizedState:qr.memoizedState,baseState:qr.baseState,baseQueue:qr.baseQueue,queue:qr.queue,next:null},Vr===null?Jt.memoizedState=Vr=t:Vr=Vr.next=t}return Vr}function zi(t,e){return typeof e=="function"?e(t):e}function Mu(t){var e=As(),r=e.queue;if(r===null)throw Error(he(311));r.lastRenderedReducer=t;var n=qr,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){i=i.next,n=n.baseState;var s=o=a=null,u=i;do{var l=u.lane;if((Vc&l)===l)s!==null&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),n=u.eagerReducer===t?u.eagerState:t(n,u.action);else{var c={lane:l,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};s===null?(o=s=c,a=n):s=s.next=c,Jt.lanes|=l,Mf|=l}u=u.next}while(u!==null&&u!==i);s===null?a=n:s.next=o,Kn(n,e.memoizedState)||(yi=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=s,r.lastRenderedState=n}return[e.memoizedState,r.dispatch]}function Fu(t){var e=As(),r=e.queue;if(r===null)throw Error(he(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,a=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=t(a,o.action),o=o.next;while(o!==i);Kn(a,e.memoizedState)||(yi=!0),e.memoizedState=a,e.baseQueue===null&&(e.baseState=a),r.lastRenderedState=a}return[a,n]}function DT(t,e,r){var n=e._getVersion;n=n(e._source);var i=e._workInProgressVersionPrimary;if(i!==null?t=i===n:(t=t.mutableReadLanes,(t=(Vc&t)===t)&&(e._workInProgressVersionPrimary=n,yl.push(e))),t)return r(e._source);throw yl.push(e),Error(he(350))}function _I(t,e,r,n){var i=fn;if(i===null)throw Error(he(349));var a=e._getVersion,o=a(e._source),s=mc.current,u=s.useState(function(){return DT(i,e,r)}),l=u[1],c=u[0];u=Vr;var f=t.memoizedState,h=f.refs,d=h.getSnapshot,p=f.source;f=f.subscribe;var v=Jt;return t.memoizedState={refs:h,source:e,subscribe:n},s.useEffect(function(){h.getSnapshot=r,h.setSnapshot=l;var g=a(e._source);if(!Kn(o,g)){g=r(e._source),Kn(c,g)||(l(g),g=uo(v),i.mutableReadLanes|=g&i.pendingLanes),g=i.mutableReadLanes,i.entangledLanes|=g;for(var m=i.entanglements,y=g;0r?98:r,function(){t(!0)}),ds(97<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[Qa]=e,t[Fd]=n,PI(t,e,!1,!1),e.stateNode=t,o=s0(r,n),r){case"dialog":Tt("cancel",t),Tt("close",t),i=n;break;case"iframe":case"object":case"embed":Tt("load",t),i=n;break;case"video":case"audio":for(i=0;ik0&&(e.flags|=64,a=!0,Lu(n,!1),e.lanes=33554432)}else{if(!a)if(t=$d(o),t!==null){if(e.flags|=64,a=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Lu(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!qi)return e=e.lastEffect=n.lastEffect,e!==null&&(e.nextEffect=null),null}else 2*Zr()-n.renderingStartTime>k0&&r!==1073741824&&(e.flags|=64,a=!0,Lu(n,!1),e.lanes=33554432);n.isBackwards?(o.sibling=e.child,e.child=o):(r=n.last,r!==null?r.sibling=o:e.child=o,n.last=o)}return n.tail!==null?(r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=e.lastEffect,n.renderingStartTime=Zr(),r.sibling=null,e=Gt.current,Xt(Gt,a?e&1|2:e&1),r):null;case 23:case 24:return lb(),t!==null&&t.memoizedState!==null!=(e.memoizedState!==null)&&n.mode!=="unstable-defer-without-hiding"&&(e.flags|=4),null}throw Error(he(156,e.tag))}function Sj(t){switch(t.tag){case 1:Cn(t.type)&&Nd();var e=t.flags;return e&4096?(t.flags=e&-4097|64,t):null;case 3:if(Fl(),Rt(An),Rt(Jr),Q1(),e=t.flags,e&64)throw Error(he(285));return t.flags=e&-4097|64,t;case 5:return Z1(t),null;case 13:return Rt(Gt),e=t.flags,e&4096?(t.flags=e&-4097|64,t):null;case 19:return Rt(Gt),null;case 4:return Fl(),null;case 10:return q1(t),null;case 23:case 24:return lb(),null;default:return null}}function ib(t,e){try{var r="",n=e;do r+=r4(n),n=n.return;while(n);var i=r}catch(a){i=` Error generating stack: `+a.message+` -`+a.stack}return{value:t,source:e,stack:i}}function C0(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var Sj=typeof WeakMap=="function"?WeakMap:Map;function RI(t,e,r){r=so(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Hd||(Hd=!0,M0=n),C0(t,e)},r}function II(t,e,r){r=so(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return C0(t,e),n(i)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){typeof n!="function"&&(Wi===null?Wi=new Set([this]):Wi.add(this),C0(t,e));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}var wj=typeof WeakSet=="function"?WeakSet:Set;function qT(t){var e=t.ref;if(e!==null)if(typeof e=="function")try{e(null)}catch(r){fo(t,r)}else e.current=null}function Ej(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(e.flags&256&&t!==null){var r=t.memoizedProps,n=t.memoizedState;t=e.stateNode,e=t.getSnapshotBeforeUpdate(e.elementType===e.type?r:vi(e.type,r),n),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:e.flags&256&&X1(e.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(he(163))}function Tj(t,e,r){switch(r.tag){case 0:case 11:case 15:case 22:if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{if((t.tag&3)===3){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{var i=t;n=i.next,i=i.tag,i&4&&i&1&&(UI(r,t),Mj(r,t)),t=n}while(t!==e)}return;case 1:t=r.stateNode,r.flags&4&&(e===null?t.componentDidMount():(n=r.elementType===r.type?e.memoizedProps:vi(r.type,e.memoizedProps),t.componentDidUpdate(n,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),e=r.updateQueue,e!==null&&RT(r,e,t);return;case 3:if(e=r.updateQueue,e!==null){if(t=null,r.child!==null)switch(r.child.tag){case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}RT(r,e,t)}return;case 5:t=r.stateNode,e===null&&r.flags&4&&rI(r.type,r.memoizedProps)&&t.focus();return;case 6:return;case 4:return;case 12:return;case 13:r.memoizedState===null&&(r=r.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&NR(r))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(he(163))}function KT(t,e){for(var r=t;;){if(r.tag===5){var n=r.stateNode;if(e)n=n.style,typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none";else{n=r.stateNode;var i=r.memoizedProps.style;i=i!=null&&i.hasOwnProperty("display")?i.display:null,n.style.display=ER("display",i)}}else if(r.tag===6)r.stateNode.nodeValue=e?"":r.memoizedProps;else if((r.tag!==23&&r.tag!==24||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function ZT(t,e){if(os&&typeof os.onCommitFiberUnmount=="function")try{os.onCommitFiberUnmount(z1,e)}catch{}switch(e.tag){case 0:case 11:case 14:case 15:case 22:if(t=e.updateQueue,t!==null&&(t=t.lastEffect,t!==null)){var r=t=t.next;do{var n=r,i=n.destroy;if(n=n.tag,i!==void 0)if(n&4)UI(e,r);else{n=e;try{i()}catch(a){fo(n,a)}}r=r.next}while(r!==t)}break;case 1:if(qT(e),t=e.stateNode,typeof t.componentWillUnmount=="function")try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(a){fo(e,a)}break;case 5:qT(e);break;case 4:kI(t,e)}}function QT(t){t.alternate=null,t.child=null,t.dependencies=null,t.firstEffect=null,t.lastEffect=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.return=null,t.updateQueue=null}function JT(t){return t.tag===5||t.tag===3||t.tag===4}function eA(t){e:{for(var e=t.return;e!==null;){if(JT(e))break e;e=e.return}throw Error(he(160))}var r=e;switch(e=r.stateNode,r.tag){case 5:var n=!1;break;case 3:e=e.containerInfo,n=!0;break;case 4:e=e.containerInfo,n=!0;break;default:throw Error(he(161))}r.flags&16&&(Rc(e,""),r.flags&=-17);e:t:for(r=t;;){for(;r.sibling===null;){if(r.return===null||JT(r.return)){r=null;break e}r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue t;r.child.return=r,r=r.child}if(!(r.flags&2)){r=r.stateNode;break e}}n?P0(t,r,e):O0(t,r,e)}function P0(t,e,r){var n=t.tag,i=n===5||n===6;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Md));else if(n!==4&&(t=t.child,t!==null))for(P0(t,e,r),t=t.sibling;t!==null;)P0(t,e,r),t=t.sibling}function O0(t,e,r){var n=t.tag,i=n===5||n===6;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(O0(t,e,r),t=t.sibling;t!==null;)O0(t,e,r),t=t.sibling}function kI(t,e){for(var r=e,n=!1,i,a;;){if(!n){n=r.return;e:for(;;){if(n===null)throw Error(he(160));switch(i=n.stateNode,n.tag){case 5:a=!1;break e;case 3:i=i.containerInfo,a=!0;break e;case 4:i=i.containerInfo,a=!0;break e}n=n.return}n=!0}if(r.tag===5||r.tag===6){e:for(var o=t,s=r,u=s;;)if(ZT(o,u),u.child!==null&&u.tag!==4)u.child.return=u,u=u.child;else{if(u===s)break e;for(;u.sibling===null;){if(u.return===null||u.return===s)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}a?(o=i,s=r.stateNode,o.nodeType===8?o.parentNode.removeChild(s):o.removeChild(s)):i.removeChild(r.stateNode)}else if(r.tag===4){if(r.child!==null){i=r.stateNode.containerInfo,a=!0,r.child.return=r,r=r.child;continue}}else if(ZT(t,r),r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return,r.tag===4&&(n=!1)}r.sibling.return=r.return,r=r.sibling}}function Ym(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do(n.tag&3)===3&&(t=n.destroy,n.destroy=void 0,t!==void 0&&t()),n=n.next;while(n!==r)}return;case 1:return;case 5:if(r=e.stateNode,r!=null){n=e.memoizedProps;var i=t!==null?t.memoizedProps:n;t=e.type;var a=e.updateQueue;if(e.updateQueue=null,a!==null){for(r[Fd]=n,t==="input"&&n.type==="radio"&&n.name!=null&&xR(r,n),s0(t,i),e=s0(t,n),i=0;ii&&(i=o),r&=~a}if(r=i,r=Zr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cj(r/1960))-r,10i&&(i=o),r&=~a}if(r=i,r=Zr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Pj(r/1960))-r,10 component higher in the tree to provide a loading indicator or placeholder to display.`)}Xr!==5&&(Xr=2),u=nb(u,s),h=o;do{switch(h.tag){case 3:a=u,h.flags|=4096,e&=-e,h.lanes|=e;var b=RI(h,a,e);OT(h,b);break e;case 1:a=u;var S=h.type,w=h.stateNode;if(!(h.flags&64)&&(typeof S.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Wi===null||!Wi.has(w)))){h.flags|=4096,e&=-e,h.lanes|=e;var E=II(h,a,e);OT(h,E);break e}}h=h.return}while(h!==null)}jI(r)}catch(T){e=T,vr===r&&r!==null&&(vr=r=r.return);continue}break}while(1)}function DI(){var t=Yd.current;return Yd.current=Wd,t===null?Wd:t}function nc(t,e){var r=Le;Le|=16;var n=DI();fn===t&&Qr===e||xl(t,e);do try{Oj();break}catch(i){LI(t,i)}while(1);if(Y1(),Le=r,Yd.current=n,vr!==null)throw Error(he(261));return fn=null,Qr=0,Xr}function Oj(){for(;vr!==null;)BI(vr)}function Rj(){for(;vr!==null&&!fj();)BI(vr)}function BI(t){var e=$I(t.alternate,t,ps);t.memoizedProps=t.pendingProps,e===null?jI(t):vr=e,ib.current=null}function jI(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&2048){if(r=bj(e),r!==null){r.flags&=2047,vr=r;return}t!==null&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}else{if(r=xj(r,e,ps),r!==null){vr=r;return}if(r=e,r.tag!==24&&r.tag!==23||r.memoizedState===null||ps&1073741824||!(r.mode&4)){for(var n=0,i=r.child;i!==null;)n|=i.lanes|i.childLanes,i=i.sibling;r.childLanes=n}t!==null&&!(t.flags&2048)&&(t.firstEffect===null&&(t.firstEffect=e.firstEffect),e.lastEffect!==null&&(t.lastEffect!==null&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1o&&(s=o,o=b,b=s),s=pT(y,b),a=pT(y,o),s&&a&&(x.rangeCount!==1||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==a.node||x.focusOffset!==a.offset)&&(_=_.createRange(),_.setStart(s.node,s.offset),x.removeAllRanges(),b>o?(x.addRange(_),x.extend(a.node,a.offset)):(_.setEnd(a.node,a.offset),x.addRange(_)))))),_=[],x=y;x=x.parentNode;)x.nodeType===1&&_.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<_.length;y++)x=_[y],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}Jh=!!jm,Um=jm=null,t.current=r,Ee=n;do try{for(y=t;Ee!==null;){var S=Ee.flags;if(S&36&&Tj(y,Ee.alternate,Ee),S&128){_=void 0;var w=Ee.ref;if(w!==null){var E=Ee.stateNode;switch(Ee.tag){case 5:_=E;break;default:_=E}typeof w=="function"?w(_):w.current=_}}Ee=Ee.nextEffect}}catch(T){if(Ee===null)throw Error(he(330));fo(Ee,T),Ee=Ee.nextEffect}while(Ee!==null);Ee=null,dj(),Le=i}else t.current=r;if(bo)bo=!1,yc=t,rc=e;else for(Ee=n;Ee!==null;)e=Ee.nextEffect,Ee.nextEffect=null,Ee.flags&8&&(S=Ee,S.sibling=null,S.stateNode=null),Ee=e;if(n=t.pendingLanes,n===0&&(Wi=null),n===1?t===L0?_c++:(_c=0,L0=t):_c=0,r=r.stateNode,os&&typeof os.onCommitFiberRoot=="function")try{os.onCommitFiberRoot(z1,r,void 0,(r.current.flags&64)===64)}catch{}if(ni(t,Zr()),Hd)throw Hd=!1,t=M0,M0=null,t;return Le&8||oa(),null}function kj(){for(;Ee!==null;){var t=Ee.alternate;od||xc===null||(Ee.flags&8?eT(Ee,xc)&&(od=!0):Ee.tag===13&&Aj(t,Ee)&&eT(Ee,xc)&&(od=!0));var e=Ee.flags;e&256&&Ej(t,Ee),!(e&512)||bo||(bo=!0,Bc(97,function(){return Ro(),null})),Ee=Ee.nextEffect}}function Ro(){if(rc!==90){var t=97Zr()-ob?xl(t,0):ab|=r),ni(t,e)}function Lj(t,e){var r=t.stateNode;r!==null&&r.delete(e),e=0,e===0&&(e=t.mode,e&2?e&4?(Ta===0&&(Ta=eu),e=Qs(62914560&~Ta),e===0&&(e=4194304)):e=Ml()===99?1:2:e=1),r=Dn(),t=Kp(t,e),t!==null&&(Vp(t,e,r),ni(t,r))}var $I;$I=function(t,e,r){var n=e.lanes;if(t!==null)if(t.memoizedProps!==e.pendingProps||An.current)yi=!0;else if(r&n)yi=!!(t.flags&16384);else{switch(yi=!1,e.tag){case 3:VT(e),Xm();break;case 5:MT(e);break;case 1:Cn(e.type)&&rd(e);break;case 4:b0(e,e.stateNode.containerInfo);break;case 10:n=e.memoizedProps.value;var i=e.type._context;Xt(Ld,i._currentValue),i._currentValue=n;break;case 13:if(e.memoizedState!==null)return r&e.child.childLanes?GT(t,e,r):(Xt(Gt,Gt.current&1),e=Pa(t,e,r),e!==null?e.sibling:null);Xt(Gt,Gt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&64){if(n)return HT(t,e,r);e.flags|=64}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xt(Gt,Gt.current),n)break;return null;case 23:case 24:return e.lanes=0,zm(t,e,r)}return Pa(t,e,r)}else yi=!1;switch(e.lanes=0,e.tag){case 2:if(n=e.type,t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=kl(e,Jr.current),gl(e,r),i=J1(null,e,n,t,i,r),e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,Cn(n)){var a=!0;rd(e)}else a=!1;e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,q1(e);var o=n.getDerivedStateFromProps;typeof o=="function"&&jd(e,n,o,t),i.updater=Hp,e.stateNode=i,i._reactInternals=e,x0(e,n,t,r),e=T0(null,e,n,!0,a,r)}else e.tag=0,Sn(null,e,i,r),e=e.child;return e;case 16:i=e.elementType;e:{switch(t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,a=i._init,i=a(i._payload),e.type=i,a=e.tag=Bj(i),t=vi(i,t),a){case 0:e=E0(null,e,i,t,r);break e;case 1:e=$T(null,e,i,t,r);break e;case 11:e=jT(null,e,i,t,r);break e;case 14:e=UT(null,e,i,vi(i.type,t),n,r);break e}throw Error(he(306,i,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),E0(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),$T(t,e,n,i,r);case 3:if(VT(e),n=e.updateQueue,t===null||n===null)throw Error(he(282));if(n=e.pendingProps,i=e.memoizedState,i=i!==null?i.element:null,hI(t,e),jc(e,n,null,r),n=e.memoizedState.element,n===i)Xm(),e=Pa(t,e,r);else{if(i=e.stateNode,(a=i.hydrate)&&(Ja=ml(e.stateNode.containerInfo.firstChild),Ca=e,a=qi=!0),a){if(t=i.mutableSourceEagerHydrationData,t!=null)for(i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(GI)}catch(t){console.error(t)}}GI(),dR.exports=ii;var XI=dR.exports;const ea=gn(XI);const zj="_Title_main_xpe81_1",Wj="_Title_buttonList_xpe81_8",Yj="_Title_button_xpe81_8",Hj="_Title_button_text_xpe81_41",qj="_Title_backup_background_xpe81_48",In={Title_main:zj,Title_buttonList:Wj,Title_button:Yj,Title_button_text:Hj,Title_backup_background:qj};function gi(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n3?e.i-4:e.i:Array.isArray(t)?1:hb(t)?2:db(t)?3:0}function Sl(t,e){return nu(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Kj(t,e){return nu(t)===2?t.get(e):t[e]}function zI(t,e,r){var n=nu(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function WI(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function hb(t){return rU&&t instanceof Map}function db(t){return nU&&t instanceof Set}function Vo(t){return t.o||t.t}function pb(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=HI(t);delete e[kt];for(var r=wl(e),n=0;n1&&(t.set=t.add=t.clear=t.delete=Zj),Object.freeze(t),e&&vs(t,function(r,n){return vb(n,!0)},!0)),t}function Zj(){gi(2)}function mb(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ki(t){var e=$0[t];return e||gi(18,t),e}function Qj(t,e){$0[t]||($0[t]=e)}function B0(){return Gc}function Zm(t,e){e&&(Ki("Patches"),t.u=[],t.s=[],t.v=e)}function Kd(t){j0(t),t.p.forEach(Jj),t.p=null}function j0(t){t===Gc&&(Gc=t.l)}function iA(t){return Gc={p:[],l:Gc,h:t,m:!0,_:0}}function Jj(t){var e=t[kt];e.i===0||e.i===1?e.j():e.g=!0}function Qm(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||Ki("ES5").S(e,t,n),n?(r[kt].P&&(Kd(e),gi(4)),Na(t)&&(t=Zd(e,t),e.l||Qd(e,t)),e.u&&Ki("Patches").M(r[kt].t,t,e.u,e.s)):t=Zd(e,r,[]),Kd(e),e.u&&e.v(e.u,e.s),t!==YI?t:void 0}function Zd(t,e,r){if(mb(e))return e;var n=e[kt];if(!n)return vs(e,function(s,u){return aA(t,n,e,s,u,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Qd(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=pb(n.k):n.o,a=i,o=!1;n.i===3&&(a=new Set(i),i.clear(),o=!0),vs(a,function(s,u){return aA(t,n,i,s,u,r,o)}),Qd(t,i,!1),r&&t.u&&Ki("Patches").N(n,r,t.u,t.s)}return n.o}function aA(t,e,r,n,i,a,o){if(wo(i)){var s=Zd(t,i,a&&e&&e.i!==3&&!Sl(e.R,n)?a.concat(n):void 0);if(zI(r,n,s),!wo(s))return;t.m=!1}else o&&r.add(i);if(Na(i)&&!mb(i)){if(!t.h.D&&t._<1)return;Zd(t,i),e&&e.A.l||Qd(t,i)}}function Qd(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&vb(e,r)}function Jm(t,e){var r=t[kt];return(r?Vo(r):t)[e]}function oA(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function qa(t){t.P||(t.P=!0,t.l&&qa(t.l))}function eg(t){t.o||(t.o=pb(t.t))}function U0(t,e,r){var n=hb(e)?Ki("MapSet").F(e,r):db(e)?Ki("MapSet").T(e,r):t.O?function(i,a){var o=Array.isArray(i),s={i:o?1:0,A:a?a.A:B0(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=s,l=Xc;o&&(u=[s],l=ic);var c=Proxy.revocable(u,l),f=c.revoke,h=c.proxy;return s.k=h,s.j=f,h}(e,r):Ki("ES5").J(e,r);return(r?r.A:B0()).p.push(n),n}function eU(t){return wo(t)||gi(22,t),function e(r){if(!Na(r))return r;var n,i=r[kt],a=nu(r);if(i){if(!i.P&&(i.i<4||!Ki("ES5").K(i)))return i.t;i.I=!0,n=sA(r,a),i.I=!1}else n=sA(r,a);return vs(n,function(o,s){i&&Kj(i.t,o)===s||zI(n,o,e(s))}),a===3?new Set(n):n}(t)}function sA(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return pb(t)}function tU(){function t(a,o){var s=i[a];return s?s.enumerable=o:i[a]=s={configurable:!0,enumerable:o,get:function(){var u=this[kt];return Xc.get(u,a)},set:function(u){var l=this[kt];Xc.set(l,a,u)}},s}function e(a){for(var o=a.length-1;o>=0;o--){var s=a[o][kt];if(!s.P)switch(s.i){case 5:n(s)&&qa(s);break;case 4:r(s)&&qa(s)}}}function r(a){for(var o=a.t,s=a.k,u=wl(s),l=u.length-1;l>=0;l--){var c=u[l];if(c!==kt){var f=o[c];if(f===void 0&&!Sl(o,c))return!0;var h=s[c],d=h&&h[kt];if(d?d.t!==f:!WI(h,f))return!0}}var p=!!o[kt];return u.length!==wl(o).length+(p?0:1)}function n(a){var o=a.k;if(o.length!==a.t.length)return!0;var s=Object.getOwnPropertyDescriptor(o,o.length-1);if(s&&!s.get)return!0;for(var u=0;u1?m-1:0),_=1;_1?c-1:0),h=1;h=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var o=Ki("Patches").$;return wo(r)?o(r,n):this.produce(r,function(s){return o(s,n)})},t}(),jn=new aU,qI=jn.produce;jn.produceWithPatches.bind(jn);jn.setAutoFreeze.bind(jn);jn.setUseProxies.bind(jn);jn.applyPatches.bind(jn);jn.createDraft.bind(jn);jn.finishDraft.bind(jn);function Rr(t){"@babel/helpers - typeof";return Rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(t)}function oU(t,e){if(Rr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Rr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function KI(t){var e=oU(t,"string");return Rr(e)=="symbol"?e:e+""}function $n(t,e,r){return e=KI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function hA(t){for(var e=1;e"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Hr(1));return r(ZI)(t,e)}if(typeof t!="function")throw new Error(Hr(2));var i=t,a=e,o=[],s=o,u=!1;function l(){s===o&&(s=o.slice())}function c(){if(u)throw new Error(Hr(3));return a}function f(v){if(typeof v!="function")throw new Error(Hr(4));if(u)throw new Error(Hr(5));var g=!0;return l(),s.push(v),function(){if(g){if(u)throw new Error(Hr(6));g=!1,l();var y=s.indexOf(v);s.splice(y,1),o=null}}}function h(v){if(!sU(v))throw new Error(Hr(7));if(typeof v.type>"u")throw new Error(Hr(8));if(u)throw new Error(Hr(9));try{u=!0,a=i(a,v)}finally{u=!1}for(var g=o=s,m=0;m"u")throw new Error(Hr(12));if(typeof r(void 0,{type:Jd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hr(13))})}function uU(t){for(var e=Object.keys(t),r={},n=0;n"u")throw l&&l.type,new Error(Hr(14));f[d]=g,c=c||g!==v}return c=c||a.length!==Object.keys(u).length,c?f:u}}function ep(){for(var t=arguments.length,e=new Array(t),r=0;r0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]-1}var KU=qU,ZU=Jp;function QU(t,e){var r=this.__data__,n=ZU(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var JU=QU,e$=LU,t$=XU,r$=YU,n$=KU,i$=JU;function iu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=i6}var Ab=a6,o6=Lf,s6=Ab,l6=Ps,u6="[object Arguments]",c6="[object Array]",f6="[object Boolean]",h6="[object Date]",d6="[object Error]",p6="[object Function]",v6="[object Map]",m6="[object Number]",g6="[object Object]",y6="[object RegExp]",_6="[object Set]",x6="[object String]",b6="[object WeakMap]",S6="[object ArrayBuffer]",w6="[object DataView]",E6="[object Float32Array]",T6="[object Float64Array]",A6="[object Int8Array]",C6="[object Int16Array]",P6="[object Int32Array]",O6="[object Uint8Array]",R6="[object Uint8ClampedArray]",I6="[object Uint16Array]",k6="[object Uint32Array]",At={};At[E6]=At[T6]=At[A6]=At[C6]=At[P6]=At[O6]=At[R6]=At[I6]=At[k6]=!0;At[u6]=At[c6]=At[S6]=At[f6]=At[w6]=At[h6]=At[d6]=At[p6]=At[v6]=At[m6]=At[g6]=At[y6]=At[_6]=At[x6]=At[b6]=!1;function M6(t){return l6(t)&&s6(t.length)&&!!At[o6(t)]}var F6=M6;function N6(t){return function(e){return t(e)}}var Cb=N6,rp={exports:{}};rp.exports;(function(t,e){var r=nk,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s})(rp,rp.exports);var Pb=rp.exports,L6=F6,D6=Cb,CA=Pb,PA=CA&&CA.isTypedArray,B6=PA?D6(PA):L6,ck=B6,j6=$V,U6=uk,$6=Da,V6=Eb,G6=Tb,X6=ck,z6=Object.prototype,W6=z6.hasOwnProperty;function Y6(t,e){var r=$6(t),n=!r&&U6(t),i=!r&&!n&&V6(t),a=!r&&!n&&!i&&X6(t),o=r||n||i||a,s=o?j6(t.length,String):[],u=s.length;for(var l in t)(e||W6.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||G6(l,u)))&&s.push(l);return s}var fk=Y6,H6=Object.prototype;function q6(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||H6;return t===r}var Ob=q6;function K6(t,e){return function(r){return t(e(r))}}var hk=K6,Z6=hk,Q6=Z6(Object.keys,Object),J6=Q6,e5=Ob,t5=J6,r5=Object.prototype,n5=r5.hasOwnProperty;function i5(t){if(!e5(t))return t5(t);var e=[];for(var r in Object(t))n5.call(t,r)&&r!="constructor"&&e.push(r);return e}var a5=i5,o5=ak,s5=Ab;function l5(t){return t!=null&&s5(t.length)&&!o5(t)}var dk=l5,u5=fk,c5=a5,f5=dk;function h5(t){return f5(t)?u5(t):c5(t)}var iv=h5,d5=nv,p5=iv;function v5(t,e){return t&&d5(e,p5(e),t)}var m5=v5;function g5(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var y5=g5,_5=sa,x5=Ob,b5=y5,S5=Object.prototype,w5=S5.hasOwnProperty;function E5(t){if(!_5(t))return b5(t);var e=x5(t),r=[];for(var n in t)n=="constructor"&&(e||!w5.call(t,n))||r.push(n);return r}var T5=E5,A5=fk,C5=T5,P5=dk;function O5(t){return P5(t)?A5(t,!0):C5(t)}var Rb=O5,R5=nv,I5=Rb;function k5(t,e){return t&&R5(e,I5(e),t)}var M5=k5,np={exports:{}};np.exports;(function(t,e){var r=Ei,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(l,c){if(c)return l.slice();var f=l.length,h=s?s(f):new l.constructor(f);return l.copy(h),h}t.exports=u})(np,np.exports);var F5=np.exports;function N5(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r(t[t.say=0]="say",t[t.changeBg=1]="changeBg",t[t.changeFigure=2]="changeFigure",t[t.bgm=3]="bgm",t[t.video=4]="video",t[t.pixi=5]="pixi",t[t.pixiInit=6]="pixiInit",t[t.intro=7]="intro",t[t.miniAvatar=8]="miniAvatar",t[t.changeScene=9]="changeScene",t[t.choose=10]="choose",t[t.end=11]="end",t[t.setComplexAnimation=12]="setComplexAnimation",t[t.setFilter=13]="setFilter",t[t.label=14]="label",t[t.jumpLabel=15]="jumpLabel",t[t.chooseLabel=16]="chooseLabel",t[t.setVar=17]="setVar",t[t.if=18]="if",t[t.callScene=19]="callScene",t[t.showVars=20]="showVars",t[t.unlockCg=21]="unlockCg",t[t.unlockBgm=22]="unlockBgm",t[t.filmMode=23]="filmMode",t[t.setTextbox=24]="setTextbox",t[t.setAnimation=25]="setAnimation",t[t.playEffect=26]="playEffect",t[t.setTempAnimation=27]="setTempAnimation",t[t.comment=28]="comment",t[t.setTransform=29]="setTransform",t[t.setTransition=30]="setTransition",t[t.getUserInput=31]="getUserInput",t[t.applyStyle=32]="applyStyle",t))(Qe||{});const dh={BGMAIN:"bg-main",FIG_C:"fig-center",FIG_L:"fig-left",FIG_R:"fig-right"},Ck={oldBgName:"",bgName:"",figName:"",figNameLeft:"",figNameRight:"",freeFigure:[],figureAssociatedAnimation:[],showText:"",showTextSize:-1,showName:"",command:"",choose:[],vocal:"",playVocal:"",vocalVolume:100,bgm:{src:"",enter:0,volume:100},uiSe:"",miniAvatar:"",GameVar:{},effects:[],bgFilter:"",bgTransform:"",PerformList:[],currentDialogKey:"initial",live2dMotion:[],live2dExpression:[],currentConcatDialogPrev:"",enableFilm:"",isDisableTextbox:!1,replacedUIlable:{},figureMetaData:{}},Mb=Qp({name:"stage",initialState:Jt(Ck),reducers:{resetStageState:(t,e)=>{Object.assign(t,e.payload)},setStage:(t,e)=>{t[e.payload.key]=e.payload.value},setStageVar:(t,e)=>{t.GameVar[e.payload.key]=e.payload.value},updateEffect:(t,e)=>{const{target:r,transform:n}=e.payload;if(![dh.BGMAIN,dh.FIG_C,dh.FIG_L,dh.FIG_R,...t.freeFigure.map(o=>o.key)].includes(r))return;const a=t.effects.findIndex(o=>o.target===r);a>=0?t.effects[a].transform=n:t.effects.push({target:r,transform:n})},removeEffectByTargetId:(t,e)=>{const r=t.effects.findIndex(n=>n.target===e.payload);r>=0&&t.effects.splice(r,1)},addPerform:(t,e)=>{if(t.PerformList.findIndex(n=>n.id===e.payload.id)>-1){const n=e.payload.id;for(let i=0;i{for(let r=0;r{for(let r=0;r{const r=t.freeFigure,n=e.payload,i=r.findIndex(a=>a.key===n.key);if(i>=0)if(n.name===""){r.splice(i,1);const a=t.figureAssociatedAnimation.findIndex(o=>o.targetId===n.key);t.figureAssociatedAnimation.splice(a,1)}else r[i].basePosition=n.basePosition,r[i].name=n.name;else n.name!==""&&r.push(n)},setLive2dMotion:(t,e)=>{const{target:r,motion:n,overrideBounds:i}=e.payload,a=t.live2dMotion.findIndex(o=>o.target===r);a<0?t.live2dMotion.push({target:r,motion:n,overrideBounds:i}):(t.live2dMotion[a].motion=n,t.live2dMotion[a].overrideBounds=i)},setLive2dExpression:(t,e)=>{const{target:r,expression:n}=e.payload,i=t.live2dExpression.findIndex(a=>a.target===r);i<0?t.live2dExpression.push({target:r,expression:n}):t.live2dExpression[i].expression=n},replaceUIlable:(t,e)=>{t.replacedUIlable[e.payload[0]]=e.payload[1]},setFigureMetaData:(t,e)=>{e.payload[3]?t.figureMetaData[e.payload[0]]&&delete t.figureMetaData[e.payload[0]]:(console.log("yeah"),t.figureMetaData[e.payload[0]]||(t.figureMetaData[e.payload[0]]={}),t.figureMetaData[e.payload[0]][e.payload[1]]=e.payload[2])}}}),{resetStageState:ov,setStage:Ge,setStageVar:Pk}=Mb.actions,Tr=Mb.actions,rz=Mb.reducer;function ph(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ok={exports:{}};/*! +Add a component higher in the tree to provide a loading indicator or placeholder to display.`)}Xr!==5&&(Xr=2),u=ib(u,s),h=o;do{switch(h.tag){case 3:a=u,h.flags|=4096,e&=-e,h.lanes|=e;var b=II(h,a,e);RT(h,b);break e;case 1:a=u;var S=h.type,w=h.stateNode;if(!(h.flags&64)&&(typeof S.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Wi===null||!Wi.has(w)))){h.flags|=4096,e&=-e,h.lanes|=e;var E=kI(h,a,e);RT(h,E);break e}}h=h.return}while(h!==null)}UI(r)}catch(T){e=T,mr===r&&r!==null&&(mr=r=r.return);continue}break}while(1)}function BI(){var t=Yd.current;return Yd.current=Wd,t===null?Wd:t}function nc(t,e){var r=Le;Le|=16;var n=BI();fn===t&&Qr===e||xl(t,e);do try{Rj();break}catch(i){DI(t,i)}while(1);if(H1(),Le=r,Yd.current=n,mr!==null)throw Error(he(261));return fn=null,Qr=0,Xr}function Rj(){for(;mr!==null;)jI(mr)}function Ij(){for(;mr!==null&&!hj();)jI(mr)}function jI(t){var e=VI(t.alternate,t,ps);t.memoizedProps=t.pendingProps,e===null?UI(t):mr=e,ab.current=null}function UI(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&2048){if(r=Sj(e),r!==null){r.flags&=2047,mr=r;return}t!==null&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}else{if(r=bj(r,e,ps),r!==null){mr=r;return}if(r=e,r.tag!==24&&r.tag!==23||r.memoizedState===null||ps&1073741824||!(r.mode&4)){for(var n=0,i=r.child;i!==null;)n|=i.lanes|i.childLanes,i=i.sibling;r.childLanes=n}t!==null&&!(t.flags&2048)&&(t.firstEffect===null&&(t.firstEffect=e.firstEffect),e.lastEffect!==null&&(t.lastEffect!==null&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1o&&(s=o,o=b,b=s),s=vT(y,b),a=vT(y,o),s&&a&&(x.rangeCount!==1||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==a.node||x.focusOffset!==a.offset)&&(_=_.createRange(),_.setStart(s.node,s.offset),x.removeAllRanges(),b>o?(x.addRange(_),x.extend(a.node,a.offset)):(_.setEnd(a.node,a.offset),x.addRange(_)))))),_=[],x=y;x=x.parentNode;)x.nodeType===1&&_.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<_.length;y++)x=_[y],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}Jh=!!jm,Um=jm=null,t.current=r,Ee=n;do try{for(y=t;Ee!==null;){var S=Ee.flags;if(S&36&&Aj(y,Ee.alternate,Ee),S&128){_=void 0;var w=Ee.ref;if(w!==null){var E=Ee.stateNode;switch(Ee.tag){case 5:_=E;break;default:_=E}typeof w=="function"?w(_):w.current=_}}Ee=Ee.nextEffect}}catch(T){if(Ee===null)throw Error(he(330));fo(Ee,T),Ee=Ee.nextEffect}while(Ee!==null);Ee=null,pj(),Le=i}else t.current=r;if(bo)bo=!1,yc=t,rc=e;else for(Ee=n;Ee!==null;)e=Ee.nextEffect,Ee.nextEffect=null,Ee.flags&8&&(S=Ee,S.sibling=null,S.stateNode=null),Ee=e;if(n=t.pendingLanes,n===0&&(Wi=null),n===1?t===L0?_c++:(_c=0,L0=t):_c=0,r=r.stateNode,os&&typeof os.onCommitFiberRoot=="function")try{os.onCommitFiberRoot(W1,r,void 0,(r.current.flags&64)===64)}catch{}if(ni(t,Zr()),Hd)throw Hd=!1,t=M0,M0=null,t;return Le&8||oa(),null}function Mj(){for(;Ee!==null;){var t=Ee.alternate;od||xc===null||(Ee.flags&8?tT(Ee,xc)&&(od=!0):Ee.tag===13&&Cj(t,Ee)&&tT(Ee,xc)&&(od=!0));var e=Ee.flags;e&256&&Tj(t,Ee),!(e&512)||bo||(bo=!0,Bc(97,function(){return Ro(),null})),Ee=Ee.nextEffect}}function Ro(){if(rc!==90){var t=97Zr()-sb?xl(t,0):ob|=r),ni(t,e)}function Dj(t,e){var r=t.stateNode;r!==null&&r.delete(e),e=0,e===0&&(e=t.mode,e&2?e&4?(Ta===0&&(Ta=eu),e=Qs(62914560&~Ta),e===0&&(e=4194304)):e=Ml()===99?1:2:e=1),r=Dn(),t=Kp(t,e),t!==null&&(Vp(t,e,r),ni(t,r))}var VI;VI=function(t,e,r){var n=e.lanes;if(t!==null)if(t.memoizedProps!==e.pendingProps||An.current)yi=!0;else if(r&n)yi=!!(t.flags&16384);else{switch(yi=!1,e.tag){case 3:GT(e),Xm();break;case 5:FT(e);break;case 1:Cn(e.type)&&rd(e);break;case 4:b0(e,e.stateNode.containerInfo);break;case 10:n=e.memoizedProps.value;var i=e.type._context;Xt(Ld,i._currentValue),i._currentValue=n;break;case 13:if(e.memoizedState!==null)return r&e.child.childLanes?XT(t,e,r):(Xt(Gt,Gt.current&1),e=Pa(t,e,r),e!==null?e.sibling:null);Xt(Gt,Gt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&64){if(n)return qT(t,e,r);e.flags|=64}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xt(Gt,Gt.current),n)break;return null;case 23:case 24:return e.lanes=0,zm(t,e,r)}return Pa(t,e,r)}else yi=!1;switch(e.lanes=0,e.tag){case 2:if(n=e.type,t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=kl(e,Jr.current),gl(e,r),i=eb(null,e,n,t,i,r),e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,Cn(n)){var a=!0;rd(e)}else a=!1;e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,K1(e);var o=n.getDerivedStateFromProps;typeof o=="function"&&jd(e,n,o,t),i.updater=Hp,e.stateNode=i,i._reactInternals=e,x0(e,n,t,r),e=T0(null,e,n,!0,a,r)}else e.tag=0,Sn(null,e,i,r),e=e.child;return e;case 16:i=e.elementType;e:{switch(t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,a=i._init,i=a(i._payload),e.type=i,a=e.tag=jj(i),t=vi(i,t),a){case 0:e=E0(null,e,i,t,r);break e;case 1:e=VT(null,e,i,t,r);break e;case 11:e=UT(null,e,i,t,r);break e;case 14:e=$T(null,e,i,vi(i.type,t),n,r);break e}throw Error(he(306,i,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),E0(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:vi(n,i),VT(t,e,n,i,r);case 3:if(GT(e),n=e.updateQueue,t===null||n===null)throw Error(he(282));if(n=e.pendingProps,i=e.memoizedState,i=i!==null?i.element:null,dI(t,e),jc(e,n,null,r),n=e.memoizedState.element,n===i)Xm(),e=Pa(t,e,r);else{if(i=e.stateNode,(a=i.hydrate)&&(Ja=ml(e.stateNode.containerInfo.firstChild),Ca=e,a=qi=!0),a){if(t=i.mutableSourceEagerHydrationData,t!=null)for(i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(XI)}catch(t){console.error(t)}}XI(),pR.exports=ii;var zI=pR.exports;const ea=gn(zI);const Wj="_Title_main_xpe81_1",Yj="_Title_buttonList_xpe81_8",Hj="_Title_button_xpe81_8",qj="_Title_button_text_xpe81_41",Kj="_Title_backup_background_xpe81_48",In={Title_main:Wj,Title_buttonList:Yj,Title_button:Hj,Title_button_text:qj,Title_backup_background:Kj};function gi(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n3?e.i-4:e.i:Array.isArray(t)?1:db(t)?2:pb(t)?3:0}function Sl(t,e){return nu(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Zj(t,e){return nu(t)===2?t.get(e):t[e]}function WI(t,e,r){var n=nu(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function YI(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function db(t){return nU&&t instanceof Map}function pb(t){return iU&&t instanceof Set}function Vo(t){return t.o||t.t}function vb(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=qI(t);delete e[kt];for(var r=wl(e),n=0;n1&&(t.set=t.add=t.clear=t.delete=Qj),Object.freeze(t),e&&vs(t,function(r,n){return mb(n,!0)},!0)),t}function Qj(){gi(2)}function gb(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ki(t){var e=$0[t];return e||gi(18,t),e}function Jj(t,e){$0[t]||($0[t]=e)}function B0(){return Gc}function Zm(t,e){e&&(Ki("Patches"),t.u=[],t.s=[],t.v=e)}function Kd(t){j0(t),t.p.forEach(eU),t.p=null}function j0(t){t===Gc&&(Gc=t.l)}function aA(t){return Gc={p:[],l:Gc,h:t,m:!0,_:0}}function eU(t){var e=t[kt];e.i===0||e.i===1?e.j():e.g=!0}function Qm(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||Ki("ES5").S(e,t,n),n?(r[kt].P&&(Kd(e),gi(4)),Na(t)&&(t=Zd(e,t),e.l||Qd(e,t)),e.u&&Ki("Patches").M(r[kt].t,t,e.u,e.s)):t=Zd(e,r,[]),Kd(e),e.u&&e.v(e.u,e.s),t!==HI?t:void 0}function Zd(t,e,r){if(gb(e))return e;var n=e[kt];if(!n)return vs(e,function(s,u){return oA(t,n,e,s,u,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Qd(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=vb(n.k):n.o,a=i,o=!1;n.i===3&&(a=new Set(i),i.clear(),o=!0),vs(a,function(s,u){return oA(t,n,i,s,u,r,o)}),Qd(t,i,!1),r&&t.u&&Ki("Patches").N(n,r,t.u,t.s)}return n.o}function oA(t,e,r,n,i,a,o){if(wo(i)){var s=Zd(t,i,a&&e&&e.i!==3&&!Sl(e.R,n)?a.concat(n):void 0);if(WI(r,n,s),!wo(s))return;t.m=!1}else o&&r.add(i);if(Na(i)&&!gb(i)){if(!t.h.D&&t._<1)return;Zd(t,i),e&&e.A.l||Qd(t,i)}}function Qd(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&mb(e,r)}function Jm(t,e){var r=t[kt];return(r?Vo(r):t)[e]}function sA(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function qa(t){t.P||(t.P=!0,t.l&&qa(t.l))}function eg(t){t.o||(t.o=vb(t.t))}function U0(t,e,r){var n=db(e)?Ki("MapSet").F(e,r):pb(e)?Ki("MapSet").T(e,r):t.O?function(i,a){var o=Array.isArray(i),s={i:o?1:0,A:a?a.A:B0(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=s,l=Xc;o&&(u=[s],l=ic);var c=Proxy.revocable(u,l),f=c.revoke,h=c.proxy;return s.k=h,s.j=f,h}(e,r):Ki("ES5").J(e,r);return(r?r.A:B0()).p.push(n),n}function tU(t){return wo(t)||gi(22,t),function e(r){if(!Na(r))return r;var n,i=r[kt],a=nu(r);if(i){if(!i.P&&(i.i<4||!Ki("ES5").K(i)))return i.t;i.I=!0,n=lA(r,a),i.I=!1}else n=lA(r,a);return vs(n,function(o,s){i&&Zj(i.t,o)===s||WI(n,o,e(s))}),a===3?new Set(n):n}(t)}function lA(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return vb(t)}function rU(){function t(a,o){var s=i[a];return s?s.enumerable=o:i[a]=s={configurable:!0,enumerable:o,get:function(){var u=this[kt];return Xc.get(u,a)},set:function(u){var l=this[kt];Xc.set(l,a,u)}},s}function e(a){for(var o=a.length-1;o>=0;o--){var s=a[o][kt];if(!s.P)switch(s.i){case 5:n(s)&&qa(s);break;case 4:r(s)&&qa(s)}}}function r(a){for(var o=a.t,s=a.k,u=wl(s),l=u.length-1;l>=0;l--){var c=u[l];if(c!==kt){var f=o[c];if(f===void 0&&!Sl(o,c))return!0;var h=s[c],d=h&&h[kt];if(d?d.t!==f:!YI(h,f))return!0}}var p=!!o[kt];return u.length!==wl(o).length+(p?0:1)}function n(a){var o=a.k;if(o.length!==a.t.length)return!0;var s=Object.getOwnPropertyDescriptor(o,o.length-1);if(s&&!s.get)return!0;for(var u=0;u1?m-1:0),_=1;_1?c-1:0),h=1;h=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var o=Ki("Patches").$;return wo(r)?o(r,n):this.produce(r,function(s){return o(s,n)})},t}(),jn=new oU,KI=jn.produce;jn.produceWithPatches.bind(jn);jn.setAutoFreeze.bind(jn);jn.setUseProxies.bind(jn);jn.applyPatches.bind(jn);jn.createDraft.bind(jn);jn.finishDraft.bind(jn);function Rr(t){"@babel/helpers - typeof";return Rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(t)}function sU(t,e){if(Rr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Rr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ZI(t){var e=sU(t,"string");return Rr(e)=="symbol"?e:e+""}function $n(t,e,r){return e=ZI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function dA(t){for(var e=1;e"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Hr(1));return r(QI)(t,e)}if(typeof t!="function")throw new Error(Hr(2));var i=t,a=e,o=[],s=o,u=!1;function l(){s===o&&(s=o.slice())}function c(){if(u)throw new Error(Hr(3));return a}function f(v){if(typeof v!="function")throw new Error(Hr(4));if(u)throw new Error(Hr(5));var g=!0;return l(),s.push(v),function(){if(g){if(u)throw new Error(Hr(6));g=!1,l();var y=s.indexOf(v);s.splice(y,1),o=null}}}function h(v){if(!lU(v))throw new Error(Hr(7));if(typeof v.type>"u")throw new Error(Hr(8));if(u)throw new Error(Hr(9));try{u=!0,a=i(a,v)}finally{u=!1}for(var g=o=s,m=0;m"u")throw new Error(Hr(12));if(typeof r(void 0,{type:Jd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hr(13))})}function cU(t){for(var e=Object.keys(t),r={},n=0;n"u")throw l&&l.type,new Error(Hr(14));f[d]=g,c=c||g!==v}return c=c||a.length!==Object.keys(u).length,c?f:u}}function ep(){for(var t=arguments.length,e=new Array(t),r=0;r0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]-1}var ZU=KU,QU=Jp;function JU(t,e){var r=this.__data__,n=QU(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var e$=JU,t$=DU,r$=zU,n$=HU,i$=ZU,a$=e$;function iu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=a6}var Cb=o6,s6=Lf,l6=Cb,u6=Ps,c6="[object Arguments]",f6="[object Array]",h6="[object Boolean]",d6="[object Date]",p6="[object Error]",v6="[object Function]",m6="[object Map]",g6="[object Number]",y6="[object Object]",_6="[object RegExp]",x6="[object Set]",b6="[object String]",S6="[object WeakMap]",w6="[object ArrayBuffer]",E6="[object DataView]",T6="[object Float32Array]",A6="[object Float64Array]",C6="[object Int8Array]",P6="[object Int16Array]",O6="[object Int32Array]",R6="[object Uint8Array]",I6="[object Uint8ClampedArray]",k6="[object Uint16Array]",M6="[object Uint32Array]",At={};At[T6]=At[A6]=At[C6]=At[P6]=At[O6]=At[R6]=At[I6]=At[k6]=At[M6]=!0;At[c6]=At[f6]=At[w6]=At[h6]=At[E6]=At[d6]=At[p6]=At[v6]=At[m6]=At[g6]=At[y6]=At[_6]=At[x6]=At[b6]=At[S6]=!1;function F6(t){return u6(t)&&l6(t.length)&&!!At[s6(t)]}var N6=F6;function L6(t){return function(e){return t(e)}}var Pb=L6,rp={exports:{}};rp.exports;(function(t,e){var r=ik,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s})(rp,rp.exports);var Ob=rp.exports,D6=N6,B6=Pb,PA=Ob,OA=PA&&PA.isTypedArray,j6=OA?B6(OA):D6,fk=j6,U6=VV,$6=ck,V6=Da,G6=Tb,X6=Ab,z6=fk,W6=Object.prototype,Y6=W6.hasOwnProperty;function H6(t,e){var r=V6(t),n=!r&&$6(t),i=!r&&!n&&G6(t),a=!r&&!n&&!i&&z6(t),o=r||n||i||a,s=o?U6(t.length,String):[],u=s.length;for(var l in t)(e||Y6.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||X6(l,u)))&&s.push(l);return s}var hk=H6,q6=Object.prototype;function K6(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||q6;return t===r}var Rb=K6;function Z6(t,e){return function(r){return t(e(r))}}var dk=Z6,Q6=dk,J6=Q6(Object.keys,Object),e5=J6,t5=Rb,r5=e5,n5=Object.prototype,i5=n5.hasOwnProperty;function a5(t){if(!t5(t))return r5(t);var e=[];for(var r in Object(t))i5.call(t,r)&&r!="constructor"&&e.push(r);return e}var o5=a5,s5=ok,l5=Cb;function u5(t){return t!=null&&l5(t.length)&&!s5(t)}var pk=u5,c5=hk,f5=o5,h5=pk;function d5(t){return h5(t)?c5(t):f5(t)}var iv=d5,p5=nv,v5=iv;function m5(t,e){return t&&p5(e,v5(e),t)}var g5=m5;function y5(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var _5=y5,x5=sa,b5=Rb,S5=_5,w5=Object.prototype,E5=w5.hasOwnProperty;function T5(t){if(!x5(t))return S5(t);var e=b5(t),r=[];for(var n in t)n=="constructor"&&(e||!E5.call(t,n))||r.push(n);return r}var A5=T5,C5=hk,P5=A5,O5=pk;function R5(t){return O5(t)?C5(t,!0):P5(t)}var Ib=R5,I5=nv,k5=Ib;function M5(t,e){return t&&I5(e,k5(e),t)}var F5=M5,np={exports:{}};np.exports;(function(t,e){var r=Ei,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(l,c){if(c)return l.slice();var f=l.length,h=s?s(f):new l.constructor(f);return l.copy(h),h}t.exports=u})(np,np.exports);var N5=np.exports;function L5(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r(t[t.say=0]="say",t[t.changeBg=1]="changeBg",t[t.changeFigure=2]="changeFigure",t[t.bgm=3]="bgm",t[t.video=4]="video",t[t.pixi=5]="pixi",t[t.pixiInit=6]="pixiInit",t[t.intro=7]="intro",t[t.miniAvatar=8]="miniAvatar",t[t.changeScene=9]="changeScene",t[t.choose=10]="choose",t[t.end=11]="end",t[t.setComplexAnimation=12]="setComplexAnimation",t[t.setFilter=13]="setFilter",t[t.label=14]="label",t[t.jumpLabel=15]="jumpLabel",t[t.chooseLabel=16]="chooseLabel",t[t.setVar=17]="setVar",t[t.if=18]="if",t[t.callScene=19]="callScene",t[t.showVars=20]="showVars",t[t.unlockCg=21]="unlockCg",t[t.unlockBgm=22]="unlockBgm",t[t.filmMode=23]="filmMode",t[t.setTextbox=24]="setTextbox",t[t.setAnimation=25]="setAnimation",t[t.playEffect=26]="playEffect",t[t.setTempAnimation=27]="setTempAnimation",t[t.comment=28]="comment",t[t.setTransform=29]="setTransform",t[t.setTransition=30]="setTransition",t[t.getUserInput=31]="getUserInput",t[t.applyStyle=32]="applyStyle",t))(Qe||{});const dh={BGMAIN:"bg-main",FIG_C:"fig-center",FIG_L:"fig-left",FIG_R:"fig-right"},H0="none",Pk={oldBgName:"",bgName:"",figName:"",figNameLeft:"",figNameRight:"",freeFigure:[],figureAssociatedAnimation:[],showText:"",showTextSize:-1,showName:"",command:"",choose:[],vocal:"",playVocal:"",vocalVolume:100,bgm:{src:"",enter:0,volume:100},uiSe:"",miniAvatar:"",GameVar:{},effects:[],bgFilter:"",bgTransform:"",PerformList:[],currentDialogKey:"initial",live2dMotion:[],live2dExpression:[],currentConcatDialogPrev:"",enableFilm:"",isDisableTextbox:!1,replacedUIlable:{},figureMetaData:{}},Fb=Qp({name:"stage",initialState:zt(Pk),reducers:{resetStageState:(t,e)=>{Object.assign(t,e.payload)},setStage:(t,e)=>{t[e.payload.key]=e.payload.value},setStageVar:(t,e)=>{t.GameVar[e.payload.key]=e.payload.value},updateEffect:(t,e)=>{const{target:r,transform:n}=e.payload;if(![dh.BGMAIN,dh.FIG_C,dh.FIG_L,dh.FIG_R,...t.freeFigure.map(o=>o.key)].includes(r))return;const a=t.effects.findIndex(o=>o.target===r);a>=0?t.effects[a].transform=n:t.effects.push({target:r,transform:n})},removeEffectByTargetId:(t,e)=>{const r=t.effects.findIndex(n=>n.target===e.payload);r>=0&&t.effects.splice(r,1)},addPerform:(t,e)=>{if(t.PerformList.findIndex(n=>n.id===e.payload.id)>-1){const n=e.payload.id;for(let i=0;i{for(let r=0;r{t.PerformList.splice(0,t.PerformList.length)},removeAllPixiPerforms:(t,e)=>{for(let r=0;r{const r=t.freeFigure,n=e.payload,i=r.findIndex(a=>a.key===n.key);if(i>=0)if(n.name===""){r.splice(i,1);const a=t.figureAssociatedAnimation.findIndex(o=>o.targetId===n.key);t.figureAssociatedAnimation.splice(a,1)}else r[i].basePosition=n.basePosition,r[i].name=n.name;else n.name!==""&&r.push(n)},setLive2dMotion:(t,e)=>{const{target:r,motion:n,overrideBounds:i}=e.payload,a=t.live2dMotion.findIndex(o=>o.target===r);a<0?t.live2dMotion.push({target:r,motion:n,overrideBounds:i}):(t.live2dMotion[a].motion=n,t.live2dMotion[a].overrideBounds=i)},setLive2dExpression:(t,e)=>{const{target:r,expression:n}=e.payload,i=t.live2dExpression.findIndex(a=>a.target===r);i<0?t.live2dExpression.push({target:r,expression:n}):t.live2dExpression[i].expression=n},replaceUIlable:(t,e)=>{t.replacedUIlable[e.payload[0]]=e.payload[1]},setFigureMetaData:(t,e)=>{e.payload[3]?t.figureMetaData[e.payload[0]]&&delete t.figureMetaData[e.payload[0]]:(t.figureMetaData[e.payload[0]]||(t.figureMetaData[e.payload[0]]={}),t.figureMetaData[e.payload[0]][e.payload[1]]=e.payload[2])}}}),{resetStageState:ov,setStage:Ge,setStageVar:Ok}=Fb.actions,hr=Fb.actions,nz=Fb.reducer;function ph(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Rk={exports:{}};/*! localForage -- Offline Storage, Improved Version 1.10.0 https://localforage.github.io/localForage (c) 2013-2017 Mozilla, Apache License 2.0 -*/(function(t,e){(function(r){t.exports=r()})(function(){return function r(n,i,a){function o(l,c){if(!i[l]){if(!n[l]){var f=typeof ph=="function"&&ph;if(!c&&f)return f(l,!0);if(s)return s(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var d=i[l]={exports:{}};n[l][0].call(d.exports,function(p){var v=n[l][1][p];return o(v||p)},d,d.exports,r,n,i,a)}return i[l].exports}for(var s=typeof ph=="function"&&ph,u=0;u"u"&&r(3);var f=Promise;function h(I,X){X&&I.then(function(D){X(null,D)},function(D){X(D)})}function d(I,X,D){typeof X=="function"&&I.then(X),typeof D=="function"&&I.catch(D)}function p(I){return typeof I!="string"&&(console.warn(I+" used as a key, but it is not a string."),I=String(I)),I}function v(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var g="local-forage-detect-blob-support",m=void 0,y={},_=Object.prototype.toString,x="readonly",b="readwrite";function S(I){for(var X=I.length,D=new ArrayBuffer(X),Y=new Uint8Array(D),K=0;K=43)}}).catch(function(){return!1})}function E(I){return typeof m=="boolean"?f.resolve(m):w(I).then(function(X){return m=X,m})}function T(I){var X=y[I.name],D={};D.promise=new f(function(Y,K){D.resolve=Y,D.reject=K}),X.deferredOperations.push(D),X.dbReady?X.dbReady=X.dbReady.then(function(){return D.promise}):X.dbReady=D.promise}function A(I){var X=y[I.name],D=X.deferredOperations.pop();if(D)return D.resolve(),D.promise}function O(I,X){var D=y[I.name],Y=D.deferredOperations.pop();if(Y)return Y.reject(X),Y.promise}function P(I,X){return new f(function(D,Y){if(y[I.name]=y[I.name]||G(),I.db)if(X)T(I),I.db.close();else return D(I.db);var K=[I.name];X&&K.push(I.version);var W=u.open.apply(u,K);X&&(W.onupgradeneeded=function(re){var se=W.result;try{se.createObjectStore(I.storeName),re.oldVersion<=1&&se.createObjectStore(g)}catch(ue){if(ue.name==="ConstraintError")console.warn('The database "'+I.name+'" has been upgraded from version '+re.oldVersion+" to version "+re.newVersion+', but the storage "'+I.storeName+'" already exists.');else throw ue}}),W.onerror=function(re){re.preventDefault(),Y(W.error)},W.onsuccess=function(){var re=W.result;re.onversionchange=function(se){se.target.close()},D(re),A(I)}})}function k(I){return P(I,!1)}function M(I){return P(I,!0)}function B(I,X){if(!I.db)return!0;var D=!I.db.objectStoreNames.contains(I.storeName),Y=I.versionI.db.version;if(Y&&(I.version!==X&&console.warn('The database "'+I.name+`" can't be downgraded from version `+I.db.version+" to version "+I.version+"."),I.version=I.db.version),K||D){if(D){var W=I.db.version+1;W>I.version&&(I.version=W)}return!0}return!1}function j(I){return new f(function(X,D){var Y=new FileReader;Y.onerror=D,Y.onloadend=function(K){var W=btoa(K.target.result||"");X({__local_forage_encoded_blob:!0,data:W,type:I.type})},Y.readAsBinaryString(I)})}function z(I){var X=S(atob(I.data));return c([X],{type:I.type})}function J(I){return I&&I.__local_forage_encoded_blob}function Z(I){var X=this,D=X._initReady().then(function(){var Y=y[X._dbInfo.name];if(Y&&Y.dbReady)return Y.dbReady});return d(D,I,I),D}function $(I){T(I);for(var X=y[I.name],D=X.forages,Y=0;Y0&&(!I.db||W.name==="InvalidStateError"||W.name==="NotFoundError"))return f.resolve().then(function(){if(!I.db||W.name==="NotFoundError"&&!I.db.objectStoreNames.contains(I.storeName)&&I.version<=I.db.version)return I.db&&(I.version=I.db.version+1),M(I)}).then(function(){return $(I).then(function(){F(I,X,D,Y-1)})}).catch(D);D(W)}}function G(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function V(I){var X=this,D={db:null};if(I)for(var Y in I)D[Y]=I[Y];var K=y[D.name];K||(K=G(),y[D.name]=K),K.forages.push(X),X._initReady||(X._initReady=X.ready,X.ready=Z);var W=[];function re(){return f.resolve()}for(var se=0;se>4,me[K++]=(re&15)<<4|se>>2,me[K++]=(se&3)<<6|ue&63;return ce}function ct(I){var X=new Uint8Array(I),D="",Y;for(Y=0;Y>2],D+=Oe[(X[Y]&3)<<4|X[Y+1]>>4],D+=Oe[(X[Y+1]&15)<<2|X[Y+2]>>6],D+=Oe[X[Y+2]&63];return X.length%3===2?D=D.substring(0,D.length-1)+"=":X.length%3===1&&(D=D.substring(0,D.length-2)+"=="),D}function oi(I,X){var D="";if(I&&(D=pa.call(I)),I&&(D==="[object ArrayBuffer]"||I.buffer&&pa.call(I.buffer)==="[object ArrayBuffer]")){var Y,K=Xe;I instanceof ArrayBuffer?(Y=I,K+=Et):(Y=I.buffer,D==="[object Int8Array]"?K+=Ht:D==="[object Uint8Array]"?K+=_t:D==="[object Uint8ClampedArray]"?K+=lr:D==="[object Int16Array]"?K+=Dr:D==="[object Uint16Array]"?K+=xr:D==="[object Int32Array]"?K+=ur:D==="[object Uint32Array]"?K+=Br:D==="[object Float32Array]"?K+=br:D==="[object Float64Array]"?K+=Ri:X(new Error("Failed to get type for BinaryArray"))),X(K+ct(Y))}else if(D==="[object Blob]"){var W=new FileReader;W.onload=function(){var re=ke+I.type+"~"+ct(this.result);X(Xe+$t+re)},W.readAsArrayBuffer(I)}else try{X(JSON.stringify(I))}catch(re){console.error("Couldn't convert value into a JSON string: ",I),X(null,re)}}function Fo(I){if(I.substring(0,tt)!==Xe)return JSON.parse(I);var X=I.substring(Vt),D=I.substring(tt,Vt),Y;if(D===$t&&we.test(X)){var K=X.match(we);Y=K[1],X=X.substring(K[0].length)}var W=Ba(X);switch(D){case Et:return W;case $t:return c([W],{type:Y});case Ht:return new Int8Array(W);case _t:return new Uint8Array(W);case lr:return new Uint8ClampedArray(W);case Dr:return new Int16Array(W);case xr:return new Uint16Array(W);case ur:return new Int32Array(W);case Br:return new Uint32Array(W);case br:return new Float32Array(W);case Ri:return new Float64Array(W);default:throw new Error("Unkown type: "+D)}}var Xn={serialize:oi,deserialize:Fo,stringToBuffer:Ba,bufferToString:ct};function ja(I,X,D,Y){I.executeSql("CREATE TABLE IF NOT EXISTS "+X.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],D,Y)}function Ii(I){var X=this,D={db:null};if(I)for(var Y in I)D[Y]=typeof I[Y]!="string"?I[Y].toString():I[Y];var K=new f(function(W,re){try{D.db=openDatabase(D.name,String(D.version),D.description,D.size)}catch(se){return re(se)}D.db.transaction(function(se){ja(se,D,function(){X._dbInfo=D,W()},function(ue,ce){re(ce)})},re)});return D.serializer=Xn,K}function jr(I,X,D,Y,K,W){I.executeSql(D,Y,K,function(re,se){se.code===se.SYNTAX_ERR?re.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[X.storeName],function(ue,ce){ce.rows.length?W(ue,se):ja(ue,X,function(){ue.executeSql(D,Y,K,W)},W)},W):W(re,se)},W)}function Ua(I,X){var D=this;I=p(I);var Y=new f(function(K,W){D.ready().then(function(){var re=D._dbInfo;re.db.transaction(function(se){jr(se,re,"SELECT * FROM "+re.storeName+" WHERE key = ? LIMIT 1",[I],function(ue,ce){var me=ce.rows.length?ce.rows.item(0).value:null;me&&(me=re.serializer.deserialize(me)),K(me)},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function ki(I,X){var D=this,Y=new f(function(K,W){D.ready().then(function(){var re=D._dbInfo;re.db.transaction(function(se){jr(se,re,"SELECT * FROM "+re.storeName,[],function(ue,ce){for(var me=ce.rows,Pe=me.length,ze=0;ze0){re(nn.apply(K,[I,ue,D,Y-1]));return}se(ze)}})})}).catch(se)});return h(W,D),W}function va(I,X,D){return nn.apply(this,[I,X,D,1])}function $a(I,X){var D=this;I=p(I);var Y=new f(function(K,W){D.ready().then(function(){var re=D._dbInfo;re.db.transaction(function(se){jr(se,re,"DELETE FROM "+re.storeName+" WHERE key = ?",[I],function(){K()},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function wu(I){var X=this,D=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){jr(re,W,"DELETE FROM "+W.storeName,[],function(){Y()},function(se,ue){K(ue)})})}).catch(K)});return h(D,I),D}function Mi(I){var X=this,D=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){jr(re,W,"SELECT COUNT(key) as c FROM "+W.storeName,[],function(se,ue){var ce=ue.rows.item(0).c;Y(ce)},function(se,ue){K(ue)})})}).catch(K)});return h(D,I),D}function Jf(I,X){var D=this,Y=new f(function(K,W){D.ready().then(function(){var re=D._dbInfo;re.db.transaction(function(se){jr(se,re,"SELECT key FROM "+re.storeName+" WHERE id = ? LIMIT 1",[I+1],function(ue,ce){var me=ce.rows.length?ce.rows.item(0).key:null;K(me)},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function Fi(I){var X=this,D=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){jr(re,W,"SELECT key FROM "+W.storeName,[],function(se,ue){for(var ce=[],me=0;me '__WebKitDatabaseInfoTable__'",[],function(K,W){for(var re=[],se=0;se0}function hB(I){var X=this,D={};if(I)for(var Y in I)D[Y]=I[Y];return D.keyPrefix=LE(I,X._defaultConfig),fB()?(X._dbInfo=D,D.serializer=Xn,f.resolve()):f.reject()}function dB(I){var X=this,D=X.ready().then(function(){for(var Y=X._dbInfo.keyPrefix,K=localStorage.length-1;K>=0;K--){var W=localStorage.key(K);W.indexOf(Y)===0&&localStorage.removeItem(W)}});return h(D,I),D}function pB(I,X){var D=this;I=p(I);var Y=D.ready().then(function(){var K=D._dbInfo,W=localStorage.getItem(K.keyPrefix+I);return W&&(W=K.serializer.deserialize(W)),W});return h(Y,X),Y}function vB(I,X){var D=this,Y=D.ready().then(function(){for(var K=D._dbInfo,W=K.keyPrefix,re=W.length,se=localStorage.length,ue=1,ce=0;ce=0;re--){var se=localStorage.key(re);se.indexOf(W)===0&&localStorage.removeItem(se)}}):K=f.reject("Invalid arguments"),h(K,X),K}var SB={_driver:"localStorageWrapper",_initStorage:hB,_support:uB(),iterate:vB,getItem:pB,setItem:xB,removeItem:_B,clear:dB,length:yB,key:mB,keys:gB,dropInstance:bB},wB=function(X,D){return X===D||typeof X=="number"&&typeof D=="number"&&isNaN(X)&&isNaN(D)},EB=function(X,D){for(var Y=X.length,K=0;K"u"?"undefined":a(D))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var Y in D){if(Y==="storeName"&&(D[Y]=D[Y].replace(/\W/g,"_")),Y==="version"&&typeof D[Y]!="number")return new Error("Database version must be a number.");this._config[Y]=D[Y]}return"driver"in D&&D.driver?this.setDriver(this._config.driver):!0}else return typeof D=="string"?this._config[D]:this._config},I.prototype.defineDriver=function(D,Y,K){var W=new f(function(re,se){try{var ue=D._driver,ce=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!D._driver){se(ce);return}for(var me=wm.concat("_initStorage"),Pe=0,ze=me.length;Pe"u"}function iz(t){return t!==null&&!H0(t)&&t.constructor!==null&&!H0(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function az(t){return Rs.call(t)==="[object ArrayBuffer]"}function oz(t){return typeof FormData<"u"&&t instanceof FormData}function sz(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function lz(t){return typeof t=="string"}function uz(t){return typeof t=="number"}function Ik(t){return t!==null&&typeof t=="object"}function ud(t){if(Rs.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function cz(t){return Rs.call(t)==="[object Date]"}function fz(t){return Rs.call(t)==="[object File]"}function hz(t){return Rs.call(t)==="[object Blob]"}function kk(t){return Rs.call(t)==="[object Function]"}function dz(t){return Ik(t)&&kk(t.pipe)}function pz(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function vz(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function mz(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Lb(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),Nb(t))for(var r=0,n=t.length;r"u"||(js.isArray(u)?l=l+"[]":u=[u],js.forEach(u,function(f){js.isDate(f)?f=f.toISOString():js.isObject(f)&&(f=JSON.stringify(f)),a.push(XA(l)+"="+XA(f))}))}),i=a.join("&")}if(i){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e},_z=Vn;function sv(){this.handlers=[]}sv.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};sv.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};sv.prototype.forEach=function(e){_z.forEach(this.handlers,function(n){n!==null&&e(n)})};var xz=sv,bz=Vn,Sz=function(e,r){bz.forEach(e,function(i,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[a])})},Fk=function(e,r,n,i,a){return e.config=r,n&&(e.code=n),e.request=i,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},ag,zA;function Nk(){if(zA)return ag;zA=1;var t=Fk;return ag=function(r,n,i,a,o){var s=new Error(r);return t(s,n,i,a,o)},ag}var og,WA;function wz(){if(WA)return og;WA=1;var t=Nk();return og=function(r,n,i){var a=i.config.validateStatus;!i.status||!a||a(i.status)?r(i):n(t("Request failed with status code "+i.status,i.config,null,i.request,i))},og}var sg,YA;function Ez(){if(YA)return sg;YA=1;var t=Vn;return sg=t.isStandardBrowserEnv()?function(){return{write:function(n,i,a,o,s,u){var l=[];l.push(n+"="+encodeURIComponent(i)),t.isNumber(a)&&l.push("expires="+new Date(a).toGMTString()),t.isString(o)&&l.push("path="+o),t.isString(s)&&l.push("domain="+s),u===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){var i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),sg}var lg,HA;function Tz(){return HA||(HA=1,lg=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}),lg}var ug,qA;function Az(){return qA||(qA=1,ug=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}),ug}var cg,KA;function Cz(){if(KA)return cg;KA=1;var t=Tz(),e=Az();return cg=function(n,i){return n&&!t(i)?e(n,i):i},cg}var fg,ZA;function Pz(){if(ZA)return fg;ZA=1;var t=Vn,e=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return fg=function(n){var i={},a,o,s;return n&&t.forEach(n.split(` -`),function(l){if(s=l.indexOf(":"),a=t.trim(l.substr(0,s)).toLowerCase(),o=t.trim(l.substr(s+1)),a){if(i[a]&&e.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([o]):i[a]=i[a]?i[a]+", "+o:o}}),i},fg}var hg,QA;function Oz(){if(QA)return hg;QA=1;var t=Vn;return hg=t.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function a(o){var s=o;return r&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=a(window.location.href),function(s){var u=t.isString(s)?a(s):s;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),hg}var dg,JA;function lv(){if(JA)return dg;JA=1;function t(e){this.message=e}return t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,dg=t,dg}var pg,eC;function tC(){if(eC)return pg;eC=1;var t=Vn,e=wz(),r=Ez(),n=Mk,i=Cz(),a=Pz(),o=Oz(),s=Nk(),u=uv(),l=lv();return pg=function(f){return new Promise(function(d,p){var v=f.data,g=f.headers,m=f.responseType,y;function _(){f.cancelToken&&f.cancelToken.unsubscribe(y),f.signal&&f.signal.removeEventListener("abort",y)}t.isFormData(v)&&delete g["Content-Type"];var x=new XMLHttpRequest;if(f.auth){var b=f.auth.username||"",S=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+S)}var w=i(f.baseURL,f.url);x.open(f.method.toUpperCase(),n(w,f.params,f.paramsSerializer),!0),x.timeout=f.timeout;function E(){if(x){var A="getAllResponseHeaders"in x?a(x.getAllResponseHeaders()):null,O=!m||m==="text"||m==="json"?x.responseText:x.response,P={data:O,status:x.status,statusText:x.statusText,headers:A,config:f,request:x};e(function(M){d(M),_()},function(M){p(M),_()},P),x=null}}if("onloadend"in x?x.onloadend=E:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(E)},x.onabort=function(){x&&(p(s("Request aborted",f,"ECONNABORTED",x)),x=null)},x.onerror=function(){p(s("Network Error",f,null,x)),x=null},x.ontimeout=function(){var O=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded",P=f.transitional||u.transitional;f.timeoutErrorMessage&&(O=f.timeoutErrorMessage),p(s(O,f,P.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",x)),x=null},t.isStandardBrowserEnv()){var T=(f.withCredentials||o(w))&&f.xsrfCookieName?r.read(f.xsrfCookieName):void 0;T&&(g[f.xsrfHeaderName]=T)}"setRequestHeader"in x&&t.forEach(g,function(O,P){typeof v>"u"&&P.toLowerCase()==="content-type"?delete g[P]:x.setRequestHeader(P,O)}),t.isUndefined(f.withCredentials)||(x.withCredentials=!!f.withCredentials),m&&m!=="json"&&(x.responseType=f.responseType),typeof f.onDownloadProgress=="function"&&x.addEventListener("progress",f.onDownloadProgress),typeof f.onUploadProgress=="function"&&x.upload&&x.upload.addEventListener("progress",f.onUploadProgress),(f.cancelToken||f.signal)&&(y=function(A){x&&(p(!A||A&&A.type?new l("canceled"):A),x.abort(),x=null)},f.cancelToken&&f.cancelToken.subscribe(y),f.signal&&(f.signal.aborted?y():f.signal.addEventListener("abort",y))),v||(v=null),x.send(v)})},pg}var vg,rC;function uv(){if(rC)return vg;rC=1;var t=Vn,e=Sz,r=Fk,n={"Content-Type":"application/x-www-form-urlencoded"};function i(u,l){!t.isUndefined(u)&&t.isUndefined(u["Content-Type"])&&(u["Content-Type"]=l)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=tC()),u}function o(u,l,c){if(t.isString(u))try{return(l||JSON.parse)(u),t.trim(u)}catch(f){if(f.name!=="SyntaxError")throw f}return(c||JSON.stringify)(u)}var s={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:a(),transformRequest:[function(l,c){return e(c,"Accept"),e(c,"Content-Type"),t.isFormData(l)||t.isArrayBuffer(l)||t.isBuffer(l)||t.isStream(l)||t.isFile(l)||t.isBlob(l)?l:t.isArrayBufferView(l)?l.buffer:t.isURLSearchParams(l)?(i(c,"application/x-www-form-urlencoded;charset=utf-8"),l.toString()):t.isObject(l)||c&&c["Content-Type"]==="application/json"?(i(c,"application/json"),o(l)):l}],transformResponse:[function(l){var c=this.transitional||s.transitional,f=c&&c.silentJSONParsing,h=c&&c.forcedJSONParsing,d=!f&&this.responseType==="json";if(d||h&&t.isString(l)&&l.length)try{return JSON.parse(l)}catch(p){if(d)throw p.name==="SyntaxError"?r(p,this,"E_JSON_PARSE"):p}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return t.forEach(["delete","get","head"],function(l){s.headers[l]={}}),t.forEach(["post","put","patch"],function(l){s.headers[l]=t.merge(n)}),vg=s,vg}var Rz=Vn,Iz=uv(),kz=function(e,r,n){var i=this||Iz;return Rz.forEach(n,function(o){e=o.call(i,e,r)}),e},mg,nC;function Lk(){return nC||(nC=1,mg=function(e){return!!(e&&e.__CANCEL__)}),mg}var iC=Vn,gg=kz,Mz=Lk(),Fz=uv(),Nz=lv();function yg(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Nz("canceled")}var Lz=function(e){yg(e),e.headers=e.headers||{},e.data=gg.call(e,e.data,e.headers,e.transformRequest),e.headers=iC.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),iC.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||Fz.adapter;return r(e).then(function(i){return yg(e),i.data=gg.call(e,i.data,i.headers,e.transformResponse),i},function(i){return Mz(i)||(yg(e),i&&i.response&&(i.response.data=gg.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})},kn=Vn,Dk=function(e,r){r=r||{};var n={};function i(c,f){return kn.isPlainObject(c)&&kn.isPlainObject(f)?kn.merge(c,f):kn.isPlainObject(f)?kn.merge({},f):kn.isArray(f)?f.slice():f}function a(c){if(kn.isUndefined(r[c])){if(!kn.isUndefined(e[c]))return i(void 0,e[c])}else return i(e[c],r[c])}function o(c){if(!kn.isUndefined(r[c]))return i(void 0,r[c])}function s(c){if(kn.isUndefined(r[c])){if(!kn.isUndefined(e[c]))return i(void 0,e[c])}else return i(void 0,r[c])}function u(c){if(c in r)return i(e[c],r[c]);if(c in e)return i(void 0,e[c])}var l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return kn.forEach(Object.keys(e).concat(Object.keys(r)),function(f){var h=l[f]||a,d=h(f);kn.isUndefined(d)&&h!==u||(n[f]=d)}),n},_g,aC;function Bk(){return aC||(aC=1,_g={version:"0.24.0"}),_g}var Dz=Bk().version,Db={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Db[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var oC={};Db.transitional=function(e,r,n){function i(a,o){return"[Axios v"+Dz+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return function(a,o,s){if(e===!1)throw new Error(i(o," has been removed"+(r?" in "+r:"")));return r&&!oC[o]&&(oC[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};function Bz(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var a=n[i],o=e[a];if(o){var s=t[a],u=s===void 0||o(s,a,t);if(u!==!0)throw new TypeError("option "+a+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+a)}}var jz={assertOptions:Bz,validators:Db},jk=Vn,Uz=Mk,sC=xz,lC=Lz,cv=Dk,Uk=jz,Us=Uk.validators;function Df(t){this.defaults=t,this.interceptors={request:new sC,response:new sC}}Df.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=cv(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&Uk.assertOptions(r,{silentJSONParsing:Us.transitional(Us.boolean),forcedJSONParsing:Us.transitional(Us.boolean),clarifyTimeoutError:Us.transitional(Us.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(e)===!1||(i=i&&h.synchronous,n.unshift(h.fulfilled,h.rejected))});var a=[];this.interceptors.response.forEach(function(h){a.push(h.fulfilled,h.rejected)});var o;if(!i){var s=[lC,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(a),o=Promise.resolve(e);s.length;)o=o.then(s.shift(),s.shift());return o}for(var u=e;n.length;){var l=n.shift(),c=n.shift();try{u=l(u)}catch(f){c(f);break}}try{o=lC(u)}catch(f){return Promise.reject(f)}for(;a.length;)o=o.then(a.shift(),a.shift());return o};Df.prototype.getUri=function(e){return e=cv(this.defaults,e),Uz(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};jk.forEach(["delete","get","head","options"],function(e){Df.prototype[e]=function(r,n){return this.request(cv(n||{},{method:e,url:r,data:(n||{}).data}))}});jk.forEach(["post","put","patch"],function(e){Df.prototype[e]=function(r,n,i){return this.request(cv(i||{},{method:e,url:r,data:n}))}});var $z=Df,xg,uC;function Vz(){if(uC)return xg;uC=1;var t=lv();function e(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(o){n=o});var i=this;this.promise.then(function(a){if(i._listeners){var o,s=i._listeners.length;for(o=0;o{o.trace("Logged to cloud.",void 0,!1)}).catch(s=>{o.error("Logging to cloud failed!",void 0,!1)})}clog(e,r,n,i,a,o){const s={all:7,ALL:7,TRACE:6,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,none:0};s[n]<=s[this.level]&&(console.log("%c%s%c%s%c%s%c %s","color:white;background-color:"+i,"["+n+"]",""," ","color:"+i,"["+a.toLocaleString()+"]","",e),r&&(console.log(r),console.log("------------------------"))),o===void 0&&this.upload(e,r,n,a),o!==void 0&&o&&this.upload(e,r,n,a)}trace(e,r,n){const i=new Date,a="TRACE",o="#005CAF";this.clog(e,r,a,o,i,n)}debug(e,r,n){const i=new Date,a="DEBUG",o="#0089A7";this.clog(e,r,a,o,i,n)}info(e,r,n){const i=new Date,a="INFO",o="#00896C";this.clog(e,r,a,o,i,n)}warn(e,r,n){const i=new Date,a="WARN",o="#DDA52D";this.clog(e,r,a,o,i,n)}error(e,r,n){const i=new Date,a="ERROR",o="#AB3B3A";this.clog(e,r,a,o,i,n)}fatal(e,r,n){const i=new Date,a="FATAL",o="#E16B8C";this.clog(e,r,a,o,i,n)}}var Qz=Zz;const Jz=gn(Qz),ge=new Jz;ge.setLevel("INFO");const eW={common:{yes:"OK",no:"Cancel"},menu:{options:{title:"OPTIONS",pages:{system:{title:"System",options:{autoSpeed:{title:"Autoplay Speed",options:{slow:"Slow",medium:"Medium",fast:"Fast"}},language:{title:"Language"},resetData:{title:"Clear or Reset Data",options:{clearGameSave:"Clear game saving",resetSettings:"Reset settings",clearAll:"Clear all data"},dialogs:{clearGameSave:"Are you sure you want to clear game saving",resetSettings:"Are you sure you want to reset all settings",clearAll:"Are you sure you want to clear all data"}},gameSave:{title:"Import or Export Game Saving and Options",options:{export:"Export game saving and options",import:"Import game saving and options"},dialogs:{import:{title:"Are you sure you want to import game saving and options",tip:"Import game saving",error:"Parse game saving failed"}}},about:{title:"About WebGAL",subTitle:"WebGAL: An Open-Source Web-Based Visual Novel Engine",version:"Version",source:"Source Code Repository",contributors:"Contributors",website:"Website"}}},display:{title:"Display",options:{fullScreen:{title:"Full Screen",options:{on:"ON",off:"OFF"}},textSpeed:{title:"Text Speed",options:{slow:"Slow",medium:"Medium",fast:"Fast"}},textSize:{title:"Text Size",options:{small:"Small",medium:"Medium",large:"Large"}},textFont:{title:"Text Font",options:{siYuanSimSun:"Source Han Serif",SimHei:"Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"Textbox Opacity"},textPreview:{title:"Preview Text Showing",text:"You are previewing the text's font, size and playback speed, now. You can adjust the above options according to your perception."}}},sound:{title:"Sound",options:{volumeMain:{title:"Main Volume"},vocalVolume:{title:"Vocal Volume"},bgmVolume:{title:"BGM Volume"},seVolume:{title:"Sound Effects Volume"},uiSeVolume:{title:"UI Sound Effects Volume"}}}}},saving:{title:"SAVE",isOverwrite:"Are you sure you want to overwrite this save?"},loadSaving:{title:"LOAD"},title:{title:"TITLE"},exit:{title:"BACK"}},title:{start:{title:"START",subtitle:""},continue:{title:"CONTINUE",subtitle:""},options:{title:"OPTIONS",subtitle:""},load:{title:"LOAD",subtitle:""},extra:{title:"EXTRA",subtitle:""}},gaming:{noSaving:"No saving",buttons:{hide:"Hide",show:"Show",backlog:"Backlog",replay:"Replay",auto:"Auto",forward:"Forward",quicklySave:"Quickly Save",quicklyLoad:"Quickly Load",save:"Save",load:"Load",options:"Options",title:"Title",titleTips:"Confirm return to the title screen"}},extra:{title:"EXTRA"}},tW={common:{yes:"はい",no:"いいえ"},menu:{options:{title:"CONFIG",pages:{system:{title:"システム",options:{autoSpeed:{title:"自動再生速度",options:{slow:"遅く",medium:"標準",fast:"速く"}},language:{title:"言語"},resetData:{title:"データの復元と削除",options:{clearGameSave:"すべてのセーブデータを削除",resetSettings:"設定を元に戻す",clearAll:"すべてのデータを削除"},dialogs:{clearGameSave:"すべてのセーブデータを削除しますか?",resetSettings:"設定を元に戻しますか?",clearAll:"すべてのデータを削除しますか?"}},gameSave:{title:"セーブデータと設定のインポートとエクスポート",options:{export:"セーブデータと設定のエクスポート",import:"セーブデータと設定のインポート"},dialogs:{import:{title:"セーブデータと設定をインポートしますか?",tip:"セーブデータのインポート",error:"セーブデータの読み込みに失敗しました"}}},about:{title:"WebGAL について",subTitle:"WebGAL: オープンソースのウェブベースビジュアルノベルエンジン",version:"バージョン",source:"ソースコードリポジトリ",contributors:"貢献者",website:"ウェブサイト"}}},display:{title:"ウィンドウ",options:{fullScreen:{title:"フルスクリーン",options:{on:"オン",off:"オフ"}},textSpeed:{title:"テキスト表示速度",options:{slow:"遅く",medium:"標準",fast:"速く"}},textSize:{title:"テキストサイズ",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"フォント",options:{siYuanSimSun:"源ノ明朝(中国語)",SimHei:"OPPO Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"テキストボックスの不透明度"},textPreview:{title:"テキスト表示プレビュー",text:"これはテキストボックスのフォントとサイズ、表示速度のプレビューです。上にある設定で変更できます。"}}},sound:{title:"サウンド",options:{volumeMain:{title:"メイン音量"},vocalVolume:{title:"ボイス音量"},bgmVolume:{title:"BGM 音量"},seVolume:{title:"効果音音量"},uiSeVolume:{title:"UI 効果音音量"},voiceOption:{title:"ボイスの中断"},voiceStop:{title:"中断する"},voiceContinue:{title:"中断しない"}}}}},saving:{title:"SAVE",isOverwrite:"セーブデータを上書きしますか?"},loadSaving:{title:"LOAD"},title:{title:"HOME"},exit:{title:"BACK"}},title:{start:{title:"初めから",subtitle:"START"},continue:{title:"続きから",subtitle:"CONTINUE"},options:{title:"設定",subtitle:"CONFIG"},load:{title:"ロード",subtitle:"LOAD"},extra:{title:"鑑賞モード",subtitle:"EXTRA"}},gaming:{noSaving:"クイックセーブなし",buttons:{hide:"CLOSE",show:"SHOW",backlog:"LOG",replay:"REPLAY",auto:"AUTO",forward:"SKIP",quicklySave:"QUICK SAVE",quicklyLoad:"QUICK LOAD",save:"SAVE",load:"LOAD",options:"CONFIG",title:"HOME",titleTips:"タイトル画面に戻りますか?"}},extra:{title:"鑑賞モード"}},rW={common:{yes:"是",no:"否"},menu:{options:{title:"选项",pages:{system:{title:"系统",options:{autoSpeed:{title:"自动播放速度",options:{slow:"慢",medium:"中",fast:"快"}},language:{title:"语言"},resetData:{title:"清除或还原数据",options:{clearGameSave:"清除所有存档",resetSettings:"还原默认设置",clearAll:"清除所有数据"},dialogs:{clearGameSave:"确定要清除存档吗",resetSettings:"确定要还原默认设置吗",clearAll:"确定要清除所有数据吗"}},gameSave:{title:"导入或导出存档与选项",options:{export:"导出存档与选项",import:"导入存档与选项"},dialogs:{import:{title:"确定要导入存档与选项吗",tip:"导入存档",error:"存档解析失败"}}},about:{title:"关于 WebGAL",subTitle:"WebGAL:开源的网页端视觉小说引擎",version:"版本号",source:"源代码仓库",contributors:"贡献者",website:"网站"}}},display:{title:"显示",options:{fullScreen:{title:"全屏模式",options:{on:"开启",off:"关闭"}},textSpeed:{title:"文字显示速度",options:{slow:"慢",medium:"中",fast:"快"}},textSize:{title:"文本大小",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"文本字体",options:{siYuanSimSun:"思源宋体",SimHei:"黑体",lxgw:"霞鹜文楷"}},textboxOpacity:{title:"文本框不透明度"},textPreview:{title:"文本显示预览",text:"现在预览的是文本框字体大小和播放速度的情况,您可以根据您的观感调整上面的选项。"}}},sound:{title:"音频",options:{volumeMain:{title:"主音量"},vocalVolume:{title:"语音音量"},bgmVolume:{title:"背景音乐音量"},seVolume:{title:"音效音量"},uiSeVolume:{title:"用户界面音效音量"},voiceOption:{title:"是否中断语音"},voiceStop:{title:"停止语音"},voiceContinue:{title:"继续语音"}}}}},saving:{title:"存档",isOverwrite:"是否覆盖存档?"},loadSaving:{title:"读档"},title:{title:"标题",options:{load:"",extra:"鉴赏模式"}},exit:{title:"返回"}},title:{start:{title:"开始游戏",subtitle:"START"},continue:{title:"继续游戏",subtitle:"CONTINUE"},options:{title:"游戏选项",subtitle:"OPTIONS"},load:{title:"读取存档",subtitle:"LOAD"},extra:{title:"鉴赏模式",subtitle:"EXTRA"}},gaming:{noSaving:"暂无存档",buttons:{hide:"隐藏",show:"显示",backlog:"回想",replay:"重播",auto:"自动",forward:"快进",quicklySave:"快速存档",quicklyLoad:"快速读档",save:"存档",load:"读档",options:"选项",title:"标题",titleTips:"确认返回到标题界面吗"}},extra:{title:"鉴赏模式"}},nW={common:{yes:"OK",no:"Annuler"},menu:{options:{title:"OPTIONS",pages:{system:{title:"Système",options:{autoSpeed:{title:"Vitesse de lecture automatique",options:{slow:"Lente",medium:"Moyenne",fast:"Rapide"}},language:{title:"Langue"},resetData:{title:"Effacer ou réinitialiser les données",options:{clearGameSave:"Effacer la sauvegarde du jeu",resetSettings:"Réinitialiser les paramètres",clearAll:"Tout effacer"},dialogs:{clearGameSave:"Êtes-vous sûr de vouloir effacer la sauvegarde du jeu",resetSettings:"Êtes-vous sûr de vouloir réinitialiser tous les paramètres",clearAll:"Êtes-vous sûr de vouloir tout effacer"}},gameSave:{title:"Importer ou exporter la sauvegarde du jeu et les options",options:{export:"Exporter la sauvegarde du jeu et les options",import:"Importer la sauvegarde du jeu et les options"},dialogs:{import:{title:"Êtes-vous sûr de vouloir importer la sauvegarde du jeu et les options",tip:"Importer la sauvegarde du jeu",error:"Impossible d'analyser la sauvegarde du jeu"}}},about:{title:"À propos de WebGAL",subTitle:"WebGAL: Un moteur de visual novel basé sur le web en open-source",version:"Version",source:"Dépôt de code source",contributors:"Contributeurs",website:"Site web"}}},display:{title:"Affichage",options:{textSpeed:{title:"Vitesse d'affichage du texte",options:{slow:"Lente",medium:"Moyenne",fast:"Rapide"}},textSize:{title:"Taille du texte",options:{small:"Petite",medium:"Moyenne",large:"Grande"}},textFont:{title:"Police du texte",options:{siYuanSimSun:"Source Han Serif",SimHei:"Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"Textbox Opacity"},textPreview:{title:"Aperçu de l'affichage du texte",text:"Vous prévisualisez la police, la taille et la vitesse de lecture du texte, maintenant. Vous pouvez ajuster les options ci-dessus selon votre perception."}}},sound:{title:"Son",options:{volumeMain:{title:"Volume principal"},vocalVolume:{title:"Volume des voix"},bgmVolume:{title:"Volume de la musique de fond"},seVolume:{title:"Volume des effets sonores"},uiSeVolume:{title:"Volume de l’interface utilisateur"}}}}},saving:{title:"SAUVEGARDER",isOverwrite:"Êtes-vous sûr de vouloir écraser cette sauvegarde ?"},loadSaving:{title:"CHARGER"},title:{title:"TITRE"},exit:{title:"RETOUR"}},title:{start:{title:"COMMENCER",subtitle:""},continue:{title:"CONTINUER",subtitle:""},options:{title:"OPTIONS",subtitle:""},load:{title:"CHARGER",subtitle:""},extra:{title:"EXTRA",subtitle:""}},gaming:{noSaving:"Aucune sauvegarde",buttons:{hide:"Masquer",show:"Afficher",backlog:"Journal",replay:"Rejouer",auto:"Automatique",forward:"Avancer",quicklySave:"Sauvegarde rapide",quicklyLoad:"Chargement rapide",save:"Sauvegarder",load:"Charger",options:"Options",title:"Titre",titleTips:"Confirmer le retour à l'écran titre"}},extra:{title:"EXTRA"}},iW={common:{yes:"Ja",no:"Nein"},menu:{options:{title:"OPTIONEN",pages:{system:{title:"System",options:{autoSpeed:{title:"Auto-Geschwindigkeit",options:{slow:"Langsam",medium:"Normal",fast:"Schnell"}},language:{title:"Sprache"},resetData:{title:"Daten löschen oder zurücksetzen",options:{clearGameSave:"Alle Spielstände löschen",resetSettings:"Alle Einstellungen zurücksetzen",clearAll:"Alle Daten löschen"},dialogs:{clearGameSave:"Sind Sie sicher, dass Sie den Spielstand löschen möchten?",resetSettings:"Sind Sie sicher, dass Sie alle Einstellungen zurücksetzen möchten?",clearAll:"Sind Sie sicher, dass Sie alle Daten löschen möchten?"}},gameSave:{title:"Spielstand und Optionen importieren oder exportieren",options:{export:"Spielstand und Optionen exportieren",import:"Spielstand und Optionen importieren"},dialogs:{import:{title:"Sind Sie sicher, dass Sie den Spielstand und die Optionen importieren möchten?",tip:"Spielstand importieren",error:"Ein Fehler ist beim Analysieren des Spielstands aufgetreten"}}},about:{title:"Über WebGAL",subTitle:"WebGAL: Eine Open-Source Web-Based Visual Novel Engine",version:"Version",source:"Source Code Repository",contributors:"Contributors",website:"Website"}}},display:{title:"Darstellung",options:{textSpeed:{title:"Geschwindigkeit der Textanzeige",options:{slow:"Langsam",medium:"Normal",fast:"Schnell"}},textSize:{title:"Textgröße",options:{small:"Klein",medium:"Normal",large:"Groß"}},textFont:{title:"Schriftart",options:{siYuanSimSun:"Source Han Serif",SimHei:"Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"Textbox Opacity"},textPreview:{title:"Vorschautext wird angezeigt",text:"Sie können jederzeit die Schriftart, Größe und Wiedergabegeschwindigkeit des Textes nach Ihrer Vorliebe anpassen."}}},sound:{title:"Ton",options:{volumeMain:{title:"Hauptlautstärke"},vocalVolume:{title:"Stimmlautstärke"},bgmVolume:{title:"Musiklautstärke"},seVolume:{title:"Soundeffektlautstärke"},uiSeVolume:{title:"UI Soundeffektlautstärke"}}}}},saving:{title:"SPEICHERN",isOverwrite:"Sind Sie sicher, dass Sie diesen Spielstand überschreiben möchten?"},loadSaving:{title:"LADEN"},title:{title:"TITEL"},exit:{title:"ZURÜCK"}},title:{start:{title:"STARTEN",subtitle:""},continue:{title:"WEITERLESEN",subtitle:""},options:{title:"OPTIONEN",subtitle:""},load:{title:"LADEN",subtitle:""},extra:{title:"EXTRA",subtitle:""}},gaming:{noSaving:"Keine Speicherung",buttons:{hide:"Verstecken",show:"Anzeigen",backlog:"Verlauf",replay:"Wiedergabe",auto:"Auto",forward:"Überspringen",quicklySave:"Quickly Save",quicklyLoad:"Quickly Load",save:"Speichern",load:"Laden",options:"Optionen",title:"Titel"}},extra:{title:"EXTRA"}},aW={common:{yes:"是",no:"否"},menu:{options:{title:"選項",pages:{system:{title:"系統",options:{autoSpeed:{title:"自動播放速度",options:{slow:"慢",medium:"中",fast:"快"}},language:{title:"語言"},resetData:{title:"清除或還原數據",options:{clearGameSave:"清除所有存檔",resetSettings:"還原默認設定",clearAll:"清除所有數據"},dialogs:{clearGameSave:"確定要清除存檔嗎",resetSettings:"確定要還原默認設定嗎",clearAll:"確定要清除所有數據嗎"}},gameSave:{title:"導入或導出存檔與選項",options:{export:"導出存檔與選項",import:"導入存檔與選項"},dialogs:{import:{title:"確定要導入存檔與選項嗎",tip:"導入存檔",error:"存檔解析失敗"}}},about:{title:"關於 WebGAL",subTitle:"WebGAL:開源的線上視覺小說製作引擎",version:"版本號",source:"源代碼倉庫",contributors:"貢獻者",website:"網站"}}},display:{title:"顯示",options:{textSpeed:{title:"文字顯示速度",options:{slow:"慢",medium:"中",fast:"快"}},textSize:{title:"文字大小",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"文字字體",options:{siYuanSimSun:"霞鹜文楷",SimHei:"黑體"}},textboxOpacity:{title:"文本框不透明度"},textPreview:{title:"文字顯示預覽",text:"現在預覽的是文字框字體大小和播放速度的情況,您可以根據您的觀感調整上面的選項。"}}},sound:{title:"音量",options:{volumeMain:{title:"主音量"},vocalVolume:{title:"語音音量"},bgmVolume:{title:"背景音樂音量"},seVolume:{title:"音效音量"},uiSeVolume:{title:"用戶界面音效音量"}}}}},saving:{title:"存檔",isOverwrite:"是否要覆蓋存檔?"},loadSaving:{title:"讀檔"},title:{title:"標題",options:{load:"",extra:"CG模式"}},exit:{title:"返回"}},title:{start:{title:"開始遊戲",subtitle:"START"},continue:{title:"繼續遊戲",subtitle:"CONTINUE"},options:{title:"遊戲選項",subtitle:"OPTIONS"},load:{title:"讀取存檔",subtitle:"LOAD"},extra:{title:"CG模式",subtitle:"EXTRA"}},gaming:{noSaving:"暫無存檔",buttons:{hide:"隱藏",show:"顯示",backlog:"回想",replay:"重播",auto:"自動",forward:"加速",quicklySave:"快速存檔",quicklyLoad:"快速讀檔",save:"存檔",load:"讀檔",options:"選項",title:"標題",titleTips:"確認返回到標題界面嗎"}},extra:{title:"CG模式"}};var Is=(t=>(t[t.zhCn=0]="zhCn",t[t.en=1]="en",t[t.jp=2]="jp",t[t.fr=3]="fr",t[t.de=4]="de",t[t.zhTw=5]="zhTw",t))(Is||{});const ip={zhCn:"中文",en:"English",jp:"日本語",fr:"Français",de:"Deutsch",zhTw:"繁體中文"},oW={en:{translation:eW},zhCn:{translation:rW},jp:{translation:tW},fr:{translation:nW},de:{translation:iW},zhTw:{translation:aW}},sW=0;var hn=(t=>(t[t.slow=0]="slow",t[t.normal=1]="normal",t[t.fast=2]="fast",t))(hn||{}),ti=(t=>(t[t.small=0]="small",t[t.medium=1]="medium",t[t.large=2]="large",t))(ti||{}),Zi=(t=>(t[t.song=0]="song",t[t.hei=1]="hei",t[t.lxgw=2]="lxgw",t))(Zi||{}),zc=(t=>(t[t.yes=0]="yes",t[t.no=1]="no",t))(zc||{}),Qi=(t=>(t[t.on=0]="on",t[t.off=1]="off",t))(Qi||{});const Vk={slPage:1,volumeMain:100,textSpeed:hn.normal,autoSpeed:hn.normal,textSize:ti.medium,vocalVolume:100,bgmVolume:25,seVolume:100,uiSeVolume:50,textboxFont:Zi.song,textboxOpacity:75,language:Is.zhCn,voiceInterruption:zc.yes,fullScreen:Qi.off},K0={optionData:Vk,scriptManagedGlobalVar:[],globalGameVar:{},appreciationData:{bgm:[],cg:[]}},Gk=Qp({name:"userData",initialState:Jt(K0),reducers:{setUserData:(t,e)=>{const{key:r,value:n}=e.payload;t[r]=n},unlockCgInUserData:(t,e)=>{const{name:r,url:n,series:i}=e.payload;let a=!1;t.appreciationData.cg.forEach(o=>{n===o.url&&(a=!0,o.url=n,o.series=i)}),a||t.appreciationData.cg.push(e.payload)},unlockBgmInUserData:(t,e)=>{const{name:r,url:n,series:i}=e.payload;let a=!1;t.appreciationData.bgm.forEach(o=>{n===o.url&&(a=!0,o.url=n,o.series=i)}),a||t.appreciationData.bgm.push(e.payload)},resetUserData:(t,e)=>{Object.assign(t,e.payload)},setOptionData:(t,e)=>{const{key:r,value:n}=e.payload;t.optionData[r]=n},setGlobalVar:(t,e)=>{t.scriptManagedGlobalVar.findIndex(n=>n===e.payload.key)>=0||(t.globalGameVar[e.payload.key]=e.payload.value)},setScriptManagedGlobalVar:(t,e)=>{const r=t.scriptManagedGlobalVar.findIndex(n=>n===e.payload.key)>=0;t.globalGameVar[e.payload.key]=e.payload.value,r||t.scriptManagedGlobalVar.push(e.payload.key)},setSlPage:(t,e)=>{t.optionData.slPage=e.payload},resetOptionSet(t){Object.assign(t.optionData,Vk)},resetAllData(t){Object.assign(t,Jt(K0))}}}),{setUserData:ywe,resetUserData:Bb,setOptionData:Ct,setGlobalVar:dC,setScriptManagedGlobalVar:lW,setSlPage:Xk,unlockCgInUserData:zk,unlockBgmInUserData:Wk,resetOptionSet:uW,resetAllData:cW}=Gk.actions,fW=Gk.reducer,Yk={backlog_size:200,fast_timeout:50},hW={textInitialDelay:80};class dW{constructor(e){Ae(this,"isSaveBacklogNext",!1);Ae(this,"backlog",[]);Ae(this,"sceneManager");this.sceneManager=e}getBacklog(){return this.backlog}editLastBacklogItemEffect(e){this.backlog[this.backlog.length-1].currentStageState.effects=e}makeBacklogEmpty(){this.backlog.splice(0,this.backlog.length)}insertBacklogItem(e){this.backlog.push(e)}saveCurrentStateToBacklog(){const e=te.getState().stage,r=Jt(e);r.PerformList.forEach(i=>{i.script.args.forEach(a=>{a.key==="concat"&&(a.value=!1,i.script.content=r.showText)})});const n={currentStageState:r,saveScene:{currentSentenceId:this.sceneManager.sceneData.currentSentenceId,sceneStack:Jt(this.sceneManager.sceneData.sceneStack),sceneName:this.sceneManager.sceneData.currentScene.sceneName,sceneUrl:this.sceneManager.sceneData.currentScene.sceneUrl}};for(this.getBacklog().push(n);this.getBacklog().length>Yk.backlog_size;)this.getBacklog().shift()}}const pC={currentSentenceId:0,sceneStack:[],currentScene:{sceneName:"",sceneUrl:"",sentenceList:[],assetsList:[],subSceneList:[]}};class pW{constructor(){Ae(this,"settledScenes",[]);Ae(this,"settledAssets",[]);Ae(this,"sceneData",Jt(pC));Ae(this,"lockSceneWrite",!1)}resetScene(){this.sceneData.currentSentenceId=0,this.sceneData.sceneStack=[],this.sceneData.currentScene=Jt(pC.currentScene)}}class vW{constructor(){Ae(this,"nextEnterAnimationName",new Map);Ae(this,"nextExitAnimationName",new Map);Ae(this,"animations",[])}addAnimation(e){this.animations.push(e)}getAnimations(){return this.animations}}const mW={performName:"",duration:100,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0};var Fn=(t=>(t[t.background=0]="background",t[t.bgm=1]="bgm",t[t.figure=2]="figure",t[t.scene=3]="scene",t[t.tex=4]="tex",t[t.vocal=5]="vocal",t[t.video=6]="video",t))(Fn||{});const Nn=(t,e)=>{if(t.match("http://")||t.match("https://"))return t;{let r;switch(e){case 0:r=`./game/background/${t}`;break;case 3:r=`./game/scene/${t}`;break;case 5:r=`./game/vocal/${t}`;break;case 2:r=`./game/figure/${t}`;break;case 1:r=`./game/bgm/${t}`;break;case 6:r=`./game/video/${t}`;break;default:r="";break}return r}},gW=t=>{for(const e of t)if(L.sceneManager.settledAssets.includes(e.url))ge.debug(`该资源${e.url}已在预加载列表中,无需重复加载`);else{const n=document.createElement("link");n.setAttribute("rel","prefetch"),n.setAttribute("href",e.url);const i=document.getElementsByTagName("head");if(i.length)try{i[0].appendChild(n)}catch(a){console.log("预加载出错",a)}L.sceneManager.settledAssets.push(e.url)}};var Te;(function(t){t[t.say=0]="say",t[t.changeBg=1]="changeBg",t[t.changeFigure=2]="changeFigure",t[t.bgm=3]="bgm",t[t.video=4]="video",t[t.pixi=5]="pixi",t[t.pixiInit=6]="pixiInit",t[t.intro=7]="intro",t[t.miniAvatar=8]="miniAvatar",t[t.changeScene=9]="changeScene",t[t.choose=10]="choose",t[t.end=11]="end",t[t.setComplexAnimation=12]="setComplexAnimation",t[t.setFilter=13]="setFilter",t[t.label=14]="label",t[t.jumpLabel=15]="jumpLabel",t[t.chooseLabel=16]="chooseLabel",t[t.setVar=17]="setVar",t[t.if=18]="if",t[t.callScene=19]="callScene",t[t.showVars=20]="showVars",t[t.unlockCg=21]="unlockCg",t[t.unlockBgm=22]="unlockBgm",t[t.filmMode=23]="filmMode",t[t.setTextbox=24]="setTextbox",t[t.setAnimation=25]="setAnimation",t[t.playEffect=26]="playEffect",t[t.setTempAnimation=27]="setTempAnimation",t[t.comment=28]="comment",t[t.setTransform=29]="setTransform",t[t.setTransition=30]="setTransition",t[t.getUserInput=31]="getUserInput",t[t.applyStyle=32]="applyStyle"})(Te||(Te={}));Te.intro,Te.changeBg,Te.changeFigure,Te.miniAvatar,Te.changeScene,Te.choose,Te.end,Te.bgm,Te.video,Te.setComplexAnimation,Te.setFilter,Te.pixiInit,Te.pixi,Te.label,Te.jumpLabel,Te.setVar,Te.callScene,Te.showVars,Te.unlockCg,Te.unlockBgm,Te.say,Te.filmMode,Te.callScene,Te.setTextbox,Te.setAnimation,Te.playEffect,Te.applyStyle;Te.bgm,Te.pixi,Te.pixiInit,Te.label,Te.if,Te.miniAvatar,Te.setVar,Te.unlockBgm,Te.unlockCg,Te.filmMode,Te.playEffect;var nr;(function(t){t[t.background=0]="background",t[t.bgm=1]="bgm",t[t.figure=2]="figure",t[t.scene=3]="scene",t[t.tex=4]="tex",t[t.vocal=5]="vocal",t[t.video=6]="video"})(nr||(nr={}));function Hk(t,e){const r=[];let i=t.replace(/ /g," ").split(" -");return i=i.filter(a=>a!==""),i.forEach(a=>{const o=a.indexOf("=");let s=a.slice(0,o),u=a.slice(o+1);o<0&&(s=a,u=void 0),s.toLowerCase().match(/.ogg|.mp3|.wav/)?r.push({key:"vocal",value:e(a,nr.vocal)}):u===void 0?r.push({key:s,value:!0}):u==="true"||u==="false"?r.push({key:s,value:u==="true"}):isNaN(Number(u))?r.push({key:s,value:u}):r.push({key:s,value:Number(u)})}),r}function yW(t){const e=[];let r,n=t.split(";")[0];if(n==="")return{command:"",args:[],options:[]};const i=/\s*:\s*/.exec(n);i===null?r="":(r=n.substring(0,i.index),n=n.substring(i.index+1,n.length));const a=/ -/.exec(n);if(a){const o=n.substring(a.index,n.length);n=n.substring(0,a.index);for(const s of Hk(o,(u,l)=>u))e.push(s)}return{command:r,args:n.split("|").map(o=>o.trim()).filter(o=>o!==""),options:e}}function _W(t){return t.replaceAll("\r","").split(` -`).map(r=>yW(r)).filter(r=>r.command!=="")}const vC=(t,e,r)=>{let n={type:Te.say,additionalArgs:[]};const i=xW(t,e,r);return n.type=i,i===Te.say&&t!=="say"&&n.additionalArgs.push({key:"speaker",value:t}),n=bW(n,i,e),n};function xW(t,e,r){var n;return((n=r.get(t))==null?void 0:n.scriptType)??Te.say}function bW(t,e,r){return r.includes(e)&&t.additionalArgs.push({key:"next",value:!0}),t}const SW=(t,e,r)=>{if(t==="none"||t==="")return"";switch(e){case Te.playEffect:return r(t,nr.vocal);case Te.changeBg:return r(t,nr.background);case Te.changeFigure:return r(t,nr.figure);case Te.bgm:return r(t,nr.bgm);case Te.callScene:return r(t,nr.scene);case Te.changeScene:return r(t,nr.scene);case Te.miniAvatar:return r(t,nr.figure);case Te.video:return r(t,nr.video);case Te.choose:return wW(t,r);case Te.unlockBgm:return r(t,nr.bgm);case Te.unlockCg:return r(t,nr.background);default:return t}};function wW(t,e){const r=t.split(new RegExp("(?s.match(/\./)?e(s,nr.scene):s);let o="";for(let s=0;s{const n=[];return t===Te.say&&r.forEach(i=>{i.key==="vocal"&&n.push({name:i.value,url:i.value,lineNumber:0,type:nr.vocal})}),e==="none"||e===""||(t===Te.changeBg&&n.push({name:e,url:e,lineNumber:0,type:nr.background}),t===Te.changeFigure&&n.push({name:e,url:e,lineNumber:0,type:nr.figure}),t===Te.miniAvatar&&n.push({name:e,url:e,lineNumber:0,type:nr.figure}),t===Te.video&&n.push({name:e,url:e,lineNumber:0,type:nr.video}),t===Te.bgm&&n.push({name:e,url:e,lineNumber:0,type:nr.bgm})),n},TW=(t,e)=>{const r=[];return(t===Te.changeScene||t===Te.callScene)&&r.push(e),t===Te.choose&&e.split("|").map(a=>a.split(":")[1]??"").forEach(a=>{a.match(/\./)&&r.push(a)}),r},AW=(t,e,r,n)=>{let i,a,o;const s=[];let u,l,c,f=t.split(new RegExp("(?-1}var _H=yH,xH=dv;function bH(t,e){var r=this.__data__,n=xH(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var SH=bH,wH=iH,EH=dH,TH=mH,AH=_H,CH=SH;function cu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}var Cq=Aq;function Pq(t,e,r){for(var n=-1,i=t==null?0:t.length;++n=Kq){var l=e?null:Hq(t);if(l)return qq(l);o=!1,i=Yq,u=new Xq}else u=e?[]:s;e:for(;++n{const u=t.split(` -`);let l=[],c=[];const f=u.map(h=>{const d=AW(h,i,a,o);return l=[...l,...d.sentenceAssets],c=[...c,...d.subScene],d});return l=t7(l),n(l),{sceneName:e,sceneUrl:r,sentenceList:f,assetsList:l,subSceneList:c}};function n7(t){const[e,r]=i7(t);return{classNameStyles:e,others:r}}function i7(t){const e={};let r="",n;const i=/\.([^{\s]+)\s*{((?:[^{}]*|{[^}]*})*)}/g,a=/(@[^{]+{\s*(?:[^{}]*{[^}]*}[^{}]*)+\s*})/g;for(;(n=i.exec(t))!==null;){const o=n[1],s=n[2].trim().replace(/\s*;\s*/g,`; +*/(function(t,e){(function(r){t.exports=r()})(function(){return function r(n,i,a){function o(l,c){if(!i[l]){if(!n[l]){var f=typeof ph=="function"&&ph;if(!c&&f)return f(l,!0);if(s)return s(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var d=i[l]={exports:{}};n[l][0].call(d.exports,function(p){var v=n[l][1][p];return o(v||p)},d,d.exports,r,n,i,a)}return i[l].exports}for(var s=typeof ph=="function"&&ph,u=0;u"u"&&r(3);var f=Promise;function h(I,X){X&&I.then(function(D){X(null,D)},function(D){X(D)})}function d(I,X,D){typeof X=="function"&&I.then(X),typeof D=="function"&&I.catch(D)}function p(I){return typeof I!="string"&&(console.warn(I+" used as a key, but it is not a string."),I=String(I)),I}function v(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var g="local-forage-detect-blob-support",m=void 0,y={},_=Object.prototype.toString,x="readonly",b="readwrite";function S(I){for(var X=I.length,D=new ArrayBuffer(X),Y=new Uint8Array(D),K=0;K=43)}}).catch(function(){return!1})}function E(I){return typeof m=="boolean"?f.resolve(m):w(I).then(function(X){return m=X,m})}function T(I){var X=y[I.name],D={};D.promise=new f(function(Y,K){D.resolve=Y,D.reject=K}),X.deferredOperations.push(D),X.dbReady?X.dbReady=X.dbReady.then(function(){return D.promise}):X.dbReady=D.promise}function A(I){var X=y[I.name],D=X.deferredOperations.pop();if(D)return D.resolve(),D.promise}function O(I,X){var D=y[I.name],Y=D.deferredOperations.pop();if(Y)return Y.reject(X),Y.promise}function P(I,X){return new f(function(D,Y){if(y[I.name]=y[I.name]||G(),I.db)if(X)T(I),I.db.close();else return D(I.db);var K=[I.name];X&&K.push(I.version);var W=u.open.apply(u,K);X&&(W.onupgradeneeded=function(re){var se=W.result;try{se.createObjectStore(I.storeName),re.oldVersion<=1&&se.createObjectStore(g)}catch(ue){if(ue.name==="ConstraintError")console.warn('The database "'+I.name+'" has been upgraded from version '+re.oldVersion+" to version "+re.newVersion+', but the storage "'+I.storeName+'" already exists.');else throw ue}}),W.onerror=function(re){re.preventDefault(),Y(W.error)},W.onsuccess=function(){var re=W.result;re.onversionchange=function(se){se.target.close()},D(re),A(I)}})}function k(I){return P(I,!1)}function M(I){return P(I,!0)}function B(I,X){if(!I.db)return!0;var D=!I.db.objectStoreNames.contains(I.storeName),Y=I.versionI.db.version;if(Y&&(I.version!==X&&console.warn('The database "'+I.name+`" can't be downgraded from version `+I.db.version+" to version "+I.version+"."),I.version=I.db.version),K||D){if(D){var W=I.db.version+1;W>I.version&&(I.version=W)}return!0}return!1}function j(I){return new f(function(X,D){var Y=new FileReader;Y.onerror=D,Y.onloadend=function(K){var W=btoa(K.target.result||"");X({__local_forage_encoded_blob:!0,data:W,type:I.type})},Y.readAsBinaryString(I)})}function z(I){var X=S(atob(I.data));return c([X],{type:I.type})}function J(I){return I&&I.__local_forage_encoded_blob}function Z(I){var X=this,D=X._initReady().then(function(){var Y=y[X._dbInfo.name];if(Y&&Y.dbReady)return Y.dbReady});return d(D,I,I),D}function $(I){T(I);for(var X=y[I.name],D=X.forages,Y=0;Y0&&(!I.db||W.name==="InvalidStateError"||W.name==="NotFoundError"))return f.resolve().then(function(){if(!I.db||W.name==="NotFoundError"&&!I.db.objectStoreNames.contains(I.storeName)&&I.version<=I.db.version)return I.db&&(I.version=I.db.version+1),M(I)}).then(function(){return $(I).then(function(){F(I,X,D,Y-1)})}).catch(D);D(W)}}function G(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function V(I){var X=this,D={db:null};if(I)for(var Y in I)D[Y]=I[Y];var K=y[D.name];K||(K=G(),y[D.name]=K),K.forages.push(X),X._initReady||(X._initReady=X.ready,X.ready=Z);var W=[];function re(){return f.resolve()}for(var se=0;se>4,me[K++]=(re&15)<<4|se>>2,me[K++]=(se&3)<<6|ue&63;return ce}function ct(I){var X=new Uint8Array(I),D="",Y;for(Y=0;Y>2],D+=Oe[(X[Y]&3)<<4|X[Y+1]>>4],D+=Oe[(X[Y+1]&15)<<2|X[Y+2]>>6],D+=Oe[X[Y+2]&63];return X.length%3===2?D=D.substring(0,D.length-1)+"=":X.length%3===1&&(D=D.substring(0,D.length-2)+"=="),D}function oi(I,X){var D="";if(I&&(D=pa.call(I)),I&&(D==="[object ArrayBuffer]"||I.buffer&&pa.call(I.buffer)==="[object ArrayBuffer]")){var Y,K=Xe;I instanceof ArrayBuffer?(Y=I,K+=Et):(Y=I.buffer,D==="[object Int8Array]"?K+=qt:D==="[object Uint8Array]"?K+=_t:D==="[object Uint8ClampedArray]"?K+=lr:D==="[object Int16Array]"?K+=Dr:D==="[object Uint16Array]"?K+=br:D==="[object Int32Array]"?K+=ur:D==="[object Uint32Array]"?K+=Br:D==="[object Float32Array]"?K+=Sr:D==="[object Float64Array]"?K+=Ri:X(new Error("Failed to get type for BinaryArray"))),X(K+ct(Y))}else if(D==="[object Blob]"){var W=new FileReader;W.onload=function(){var re=ke+I.type+"~"+ct(this.result);X(Xe+$t+re)},W.readAsArrayBuffer(I)}else try{X(JSON.stringify(I))}catch(re){console.error("Couldn't convert value into a JSON string: ",I),X(null,re)}}function Fo(I){if(I.substring(0,tt)!==Xe)return JSON.parse(I);var X=I.substring(Vt),D=I.substring(tt,Vt),Y;if(D===$t&&we.test(X)){var K=X.match(we);Y=K[1],X=X.substring(K[0].length)}var W=Ba(X);switch(D){case Et:return W;case $t:return c([W],{type:Y});case qt:return new Int8Array(W);case _t:return new Uint8Array(W);case lr:return new Uint8ClampedArray(W);case Dr:return new Int16Array(W);case br:return new Uint16Array(W);case ur:return new Int32Array(W);case Br:return new Uint32Array(W);case Sr:return new Float32Array(W);case Ri:return new Float64Array(W);default:throw new Error("Unkown type: "+D)}}var Xn={serialize:oi,deserialize:Fo,stringToBuffer:Ba,bufferToString:ct};function ja(I,X,D,Y){I.executeSql("CREATE TABLE IF NOT EXISTS "+X.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],D,Y)}function Ii(I){var X=this,D={db:null};if(I)for(var Y in I)D[Y]=typeof I[Y]!="string"?I[Y].toString():I[Y];var K=new f(function(W,re){try{D.db=openDatabase(D.name,String(D.version),D.description,D.size)}catch(se){return re(se)}D.db.transaction(function(se){ja(se,D,function(){X._dbInfo=D,W()},function(ue,ce){re(ce)})},re)});return D.serializer=Xn,K}function jr(I,X,D,Y,K,W){I.executeSql(D,Y,K,function(re,se){se.code===se.SYNTAX_ERR?re.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[X.storeName],function(ue,ce){ce.rows.length?W(ue,se):ja(ue,X,function(){ue.executeSql(D,Y,K,W)},W)},W):W(re,se)},W)}function Ua(I,X){var D=this;I=p(I);var Y=new f(function(K,W){D.ready().then(function(){var re=D._dbInfo;re.db.transaction(function(se){jr(se,re,"SELECT * FROM "+re.storeName+" WHERE key = ? LIMIT 1",[I],function(ue,ce){var me=ce.rows.length?ce.rows.item(0).value:null;me&&(me=re.serializer.deserialize(me)),K(me)},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function ki(I,X){var D=this,Y=new f(function(K,W){D.ready().then(function(){var re=D._dbInfo;re.db.transaction(function(se){jr(se,re,"SELECT * FROM "+re.storeName,[],function(ue,ce){for(var me=ce.rows,Pe=me.length,ze=0;ze0){re(nn.apply(K,[I,ue,D,Y-1]));return}se(ze)}})})}).catch(se)});return h(W,D),W}function va(I,X,D){return nn.apply(this,[I,X,D,1])}function $a(I,X){var D=this;I=p(I);var Y=new f(function(K,W){D.ready().then(function(){var re=D._dbInfo;re.db.transaction(function(se){jr(se,re,"DELETE FROM "+re.storeName+" WHERE key = ?",[I],function(){K()},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function wu(I){var X=this,D=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){jr(re,W,"DELETE FROM "+W.storeName,[],function(){Y()},function(se,ue){K(ue)})})}).catch(K)});return h(D,I),D}function Mi(I){var X=this,D=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){jr(re,W,"SELECT COUNT(key) as c FROM "+W.storeName,[],function(se,ue){var ce=ue.rows.item(0).c;Y(ce)},function(se,ue){K(ue)})})}).catch(K)});return h(D,I),D}function Jf(I,X){var D=this,Y=new f(function(K,W){D.ready().then(function(){var re=D._dbInfo;re.db.transaction(function(se){jr(se,re,"SELECT key FROM "+re.storeName+" WHERE id = ? LIMIT 1",[I+1],function(ue,ce){var me=ce.rows.length?ce.rows.item(0).key:null;K(me)},function(ue,ce){W(ce)})})}).catch(W)});return h(Y,X),Y}function Fi(I){var X=this,D=new f(function(Y,K){X.ready().then(function(){var W=X._dbInfo;W.db.transaction(function(re){jr(re,W,"SELECT key FROM "+W.storeName,[],function(se,ue){for(var ce=[],me=0;me '__WebKitDatabaseInfoTable__'",[],function(K,W){for(var re=[],se=0;se0}function dB(I){var X=this,D={};if(I)for(var Y in I)D[Y]=I[Y];return D.keyPrefix=DE(I,X._defaultConfig),hB()?(X._dbInfo=D,D.serializer=Xn,f.resolve()):f.reject()}function pB(I){var X=this,D=X.ready().then(function(){for(var Y=X._dbInfo.keyPrefix,K=localStorage.length-1;K>=0;K--){var W=localStorage.key(K);W.indexOf(Y)===0&&localStorage.removeItem(W)}});return h(D,I),D}function vB(I,X){var D=this;I=p(I);var Y=D.ready().then(function(){var K=D._dbInfo,W=localStorage.getItem(K.keyPrefix+I);return W&&(W=K.serializer.deserialize(W)),W});return h(Y,X),Y}function mB(I,X){var D=this,Y=D.ready().then(function(){for(var K=D._dbInfo,W=K.keyPrefix,re=W.length,se=localStorage.length,ue=1,ce=0;ce=0;re--){var se=localStorage.key(re);se.indexOf(W)===0&&localStorage.removeItem(se)}}):K=f.reject("Invalid arguments"),h(K,X),K}var wB={_driver:"localStorageWrapper",_initStorage:dB,_support:cB(),iterate:mB,getItem:vB,setItem:bB,removeItem:xB,clear:pB,length:_B,key:gB,keys:yB,dropInstance:SB},EB=function(X,D){return X===D||typeof X=="number"&&typeof D=="number"&&isNaN(X)&&isNaN(D)},TB=function(X,D){for(var Y=X.length,K=0;K"u"?"undefined":a(D))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var Y in D){if(Y==="storeName"&&(D[Y]=D[Y].replace(/\W/g,"_")),Y==="version"&&typeof D[Y]!="number")return new Error("Database version must be a number.");this._config[Y]=D[Y]}return"driver"in D&&D.driver?this.setDriver(this._config.driver):!0}else return typeof D=="string"?this._config[D]:this._config},I.prototype.defineDriver=function(D,Y,K){var W=new f(function(re,se){try{var ue=D._driver,ce=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!D._driver){se(ce);return}for(var me=wm.concat("_initStorage"),Pe=0,ze=me.length;Pe"u"}function az(t){return t!==null&&!q0(t)&&t.constructor!==null&&!q0(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function oz(t){return Rs.call(t)==="[object ArrayBuffer]"}function sz(t){return typeof FormData<"u"&&t instanceof FormData}function lz(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function uz(t){return typeof t=="string"}function cz(t){return typeof t=="number"}function kk(t){return t!==null&&typeof t=="object"}function ud(t){if(Rs.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function fz(t){return Rs.call(t)==="[object Date]"}function hz(t){return Rs.call(t)==="[object File]"}function dz(t){return Rs.call(t)==="[object Blob]"}function Mk(t){return Rs.call(t)==="[object Function]"}function pz(t){return kk(t)&&Mk(t.pipe)}function vz(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function mz(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function gz(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Db(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),Lb(t))for(var r=0,n=t.length;r"u"||(js.isArray(u)?l=l+"[]":u=[u],js.forEach(u,function(f){js.isDate(f)?f=f.toISOString():js.isObject(f)&&(f=JSON.stringify(f)),a.push(zA(l)+"="+zA(f))}))}),i=a.join("&")}if(i){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e},xz=Vn;function sv(){this.handlers=[]}sv.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};sv.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};sv.prototype.forEach=function(e){xz.forEach(this.handlers,function(n){n!==null&&e(n)})};var bz=sv,Sz=Vn,wz=function(e,r){Sz.forEach(e,function(i,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[a])})},Nk=function(e,r,n,i,a){return e.config=r,n&&(e.code=n),e.request=i,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},ag,WA;function Lk(){if(WA)return ag;WA=1;var t=Nk;return ag=function(r,n,i,a,o){var s=new Error(r);return t(s,n,i,a,o)},ag}var og,YA;function Ez(){if(YA)return og;YA=1;var t=Lk();return og=function(r,n,i){var a=i.config.validateStatus;!i.status||!a||a(i.status)?r(i):n(t("Request failed with status code "+i.status,i.config,null,i.request,i))},og}var sg,HA;function Tz(){if(HA)return sg;HA=1;var t=Vn;return sg=t.isStandardBrowserEnv()?function(){return{write:function(n,i,a,o,s,u){var l=[];l.push(n+"="+encodeURIComponent(i)),t.isNumber(a)&&l.push("expires="+new Date(a).toGMTString()),t.isString(o)&&l.push("path="+o),t.isString(s)&&l.push("domain="+s),u===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){var i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),sg}var lg,qA;function Az(){return qA||(qA=1,lg=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}),lg}var ug,KA;function Cz(){return KA||(KA=1,ug=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}),ug}var cg,ZA;function Pz(){if(ZA)return cg;ZA=1;var t=Az(),e=Cz();return cg=function(n,i){return n&&!t(i)?e(n,i):i},cg}var fg,QA;function Oz(){if(QA)return fg;QA=1;var t=Vn,e=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return fg=function(n){var i={},a,o,s;return n&&t.forEach(n.split(` +`),function(l){if(s=l.indexOf(":"),a=t.trim(l.substr(0,s)).toLowerCase(),o=t.trim(l.substr(s+1)),a){if(i[a]&&e.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([o]):i[a]=i[a]?i[a]+", "+o:o}}),i},fg}var hg,JA;function Rz(){if(JA)return hg;JA=1;var t=Vn;return hg=t.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function a(o){var s=o;return r&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=a(window.location.href),function(s){var u=t.isString(s)?a(s):s;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),hg}var dg,eC;function lv(){if(eC)return dg;eC=1;function t(e){this.message=e}return t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,dg=t,dg}var pg,tC;function rC(){if(tC)return pg;tC=1;var t=Vn,e=Ez(),r=Tz(),n=Fk,i=Pz(),a=Oz(),o=Rz(),s=Lk(),u=uv(),l=lv();return pg=function(f){return new Promise(function(d,p){var v=f.data,g=f.headers,m=f.responseType,y;function _(){f.cancelToken&&f.cancelToken.unsubscribe(y),f.signal&&f.signal.removeEventListener("abort",y)}t.isFormData(v)&&delete g["Content-Type"];var x=new XMLHttpRequest;if(f.auth){var b=f.auth.username||"",S=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+S)}var w=i(f.baseURL,f.url);x.open(f.method.toUpperCase(),n(w,f.params,f.paramsSerializer),!0),x.timeout=f.timeout;function E(){if(x){var A="getAllResponseHeaders"in x?a(x.getAllResponseHeaders()):null,O=!m||m==="text"||m==="json"?x.responseText:x.response,P={data:O,status:x.status,statusText:x.statusText,headers:A,config:f,request:x};e(function(M){d(M),_()},function(M){p(M),_()},P),x=null}}if("onloadend"in x?x.onloadend=E:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(E)},x.onabort=function(){x&&(p(s("Request aborted",f,"ECONNABORTED",x)),x=null)},x.onerror=function(){p(s("Network Error",f,null,x)),x=null},x.ontimeout=function(){var O=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded",P=f.transitional||u.transitional;f.timeoutErrorMessage&&(O=f.timeoutErrorMessage),p(s(O,f,P.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",x)),x=null},t.isStandardBrowserEnv()){var T=(f.withCredentials||o(w))&&f.xsrfCookieName?r.read(f.xsrfCookieName):void 0;T&&(g[f.xsrfHeaderName]=T)}"setRequestHeader"in x&&t.forEach(g,function(O,P){typeof v>"u"&&P.toLowerCase()==="content-type"?delete g[P]:x.setRequestHeader(P,O)}),t.isUndefined(f.withCredentials)||(x.withCredentials=!!f.withCredentials),m&&m!=="json"&&(x.responseType=f.responseType),typeof f.onDownloadProgress=="function"&&x.addEventListener("progress",f.onDownloadProgress),typeof f.onUploadProgress=="function"&&x.upload&&x.upload.addEventListener("progress",f.onUploadProgress),(f.cancelToken||f.signal)&&(y=function(A){x&&(p(!A||A&&A.type?new l("canceled"):A),x.abort(),x=null)},f.cancelToken&&f.cancelToken.subscribe(y),f.signal&&(f.signal.aborted?y():f.signal.addEventListener("abort",y))),v||(v=null),x.send(v)})},pg}var vg,nC;function uv(){if(nC)return vg;nC=1;var t=Vn,e=wz,r=Nk,n={"Content-Type":"application/x-www-form-urlencoded"};function i(u,l){!t.isUndefined(u)&&t.isUndefined(u["Content-Type"])&&(u["Content-Type"]=l)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=rC()),u}function o(u,l,c){if(t.isString(u))try{return(l||JSON.parse)(u),t.trim(u)}catch(f){if(f.name!=="SyntaxError")throw f}return(c||JSON.stringify)(u)}var s={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:a(),transformRequest:[function(l,c){return e(c,"Accept"),e(c,"Content-Type"),t.isFormData(l)||t.isArrayBuffer(l)||t.isBuffer(l)||t.isStream(l)||t.isFile(l)||t.isBlob(l)?l:t.isArrayBufferView(l)?l.buffer:t.isURLSearchParams(l)?(i(c,"application/x-www-form-urlencoded;charset=utf-8"),l.toString()):t.isObject(l)||c&&c["Content-Type"]==="application/json"?(i(c,"application/json"),o(l)):l}],transformResponse:[function(l){var c=this.transitional||s.transitional,f=c&&c.silentJSONParsing,h=c&&c.forcedJSONParsing,d=!f&&this.responseType==="json";if(d||h&&t.isString(l)&&l.length)try{return JSON.parse(l)}catch(p){if(d)throw p.name==="SyntaxError"?r(p,this,"E_JSON_PARSE"):p}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return t.forEach(["delete","get","head"],function(l){s.headers[l]={}}),t.forEach(["post","put","patch"],function(l){s.headers[l]=t.merge(n)}),vg=s,vg}var Iz=Vn,kz=uv(),Mz=function(e,r,n){var i=this||kz;return Iz.forEach(n,function(o){e=o.call(i,e,r)}),e},mg,iC;function Dk(){return iC||(iC=1,mg=function(e){return!!(e&&e.__CANCEL__)}),mg}var aC=Vn,gg=Mz,Fz=Dk(),Nz=uv(),Lz=lv();function yg(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Lz("canceled")}var Dz=function(e){yg(e),e.headers=e.headers||{},e.data=gg.call(e,e.data,e.headers,e.transformRequest),e.headers=aC.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),aC.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||Nz.adapter;return r(e).then(function(i){return yg(e),i.data=gg.call(e,i.data,i.headers,e.transformResponse),i},function(i){return Fz(i)||(yg(e),i&&i.response&&(i.response.data=gg.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})},kn=Vn,Bk=function(e,r){r=r||{};var n={};function i(c,f){return kn.isPlainObject(c)&&kn.isPlainObject(f)?kn.merge(c,f):kn.isPlainObject(f)?kn.merge({},f):kn.isArray(f)?f.slice():f}function a(c){if(kn.isUndefined(r[c])){if(!kn.isUndefined(e[c]))return i(void 0,e[c])}else return i(e[c],r[c])}function o(c){if(!kn.isUndefined(r[c]))return i(void 0,r[c])}function s(c){if(kn.isUndefined(r[c])){if(!kn.isUndefined(e[c]))return i(void 0,e[c])}else return i(void 0,r[c])}function u(c){if(c in r)return i(e[c],r[c]);if(c in e)return i(void 0,e[c])}var l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return kn.forEach(Object.keys(e).concat(Object.keys(r)),function(f){var h=l[f]||a,d=h(f);kn.isUndefined(d)&&h!==u||(n[f]=d)}),n},_g,oC;function jk(){return oC||(oC=1,_g={version:"0.24.0"}),_g}var Bz=jk().version,Bb={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Bb[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var sC={};Bb.transitional=function(e,r,n){function i(a,o){return"[Axios v"+Bz+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return function(a,o,s){if(e===!1)throw new Error(i(o," has been removed"+(r?" in "+r:"")));return r&&!sC[o]&&(sC[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};function jz(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var a=n[i],o=e[a];if(o){var s=t[a],u=s===void 0||o(s,a,t);if(u!==!0)throw new TypeError("option "+a+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+a)}}var Uz={assertOptions:jz,validators:Bb},Uk=Vn,$z=Fk,lC=bz,uC=Dz,cv=Bk,$k=Uz,Us=$k.validators;function Df(t){this.defaults=t,this.interceptors={request:new lC,response:new lC}}Df.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=cv(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&$k.assertOptions(r,{silentJSONParsing:Us.transitional(Us.boolean),forcedJSONParsing:Us.transitional(Us.boolean),clarifyTimeoutError:Us.transitional(Us.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(e)===!1||(i=i&&h.synchronous,n.unshift(h.fulfilled,h.rejected))});var a=[];this.interceptors.response.forEach(function(h){a.push(h.fulfilled,h.rejected)});var o;if(!i){var s=[uC,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(a),o=Promise.resolve(e);s.length;)o=o.then(s.shift(),s.shift());return o}for(var u=e;n.length;){var l=n.shift(),c=n.shift();try{u=l(u)}catch(f){c(f);break}}try{o=uC(u)}catch(f){return Promise.reject(f)}for(;a.length;)o=o.then(a.shift(),a.shift());return o};Df.prototype.getUri=function(e){return e=cv(this.defaults,e),$z(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Uk.forEach(["delete","get","head","options"],function(e){Df.prototype[e]=function(r,n){return this.request(cv(n||{},{method:e,url:r,data:(n||{}).data}))}});Uk.forEach(["post","put","patch"],function(e){Df.prototype[e]=function(r,n,i){return this.request(cv(i||{},{method:e,url:r,data:n}))}});var Vz=Df,xg,cC;function Gz(){if(cC)return xg;cC=1;var t=lv();function e(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(o){n=o});var i=this;this.promise.then(function(a){if(i._listeners){var o,s=i._listeners.length;for(o=0;o{o.trace("Logged to cloud.",void 0,!1)}).catch(s=>{o.error("Logging to cloud failed!",void 0,!1)})}clog(e,r,n,i,a,o){const s={all:7,ALL:7,TRACE:6,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,none:0};s[n]<=s[this.level]&&(console.log("%c%s%c%s%c%s%c %s","color:white;background-color:"+i,"["+n+"]",""," ","color:"+i,"["+a.toLocaleString()+"]","",e),r&&(console.log(r),console.log("------------------------"))),o===void 0&&this.upload(e,r,n,a),o!==void 0&&o&&this.upload(e,r,n,a)}trace(e,r,n){const i=new Date,a="TRACE",o="#005CAF";this.clog(e,r,a,o,i,n)}debug(e,r,n){const i=new Date,a="DEBUG",o="#0089A7";this.clog(e,r,a,o,i,n)}info(e,r,n){const i=new Date,a="INFO",o="#00896C";this.clog(e,r,a,o,i,n)}warn(e,r,n){const i=new Date,a="WARN",o="#DDA52D";this.clog(e,r,a,o,i,n)}error(e,r,n){const i=new Date,a="ERROR",o="#AB3B3A";this.clog(e,r,a,o,i,n)}fatal(e,r,n){const i=new Date,a="FATAL",o="#E16B8C";this.clog(e,r,a,o,i,n)}}var Jz=Qz;const eW=gn(Jz),ge=new eW;ge.setLevel("INFO");const tW={common:{yes:"OK",no:"Cancel"},menu:{options:{title:"OPTIONS",pages:{system:{title:"System",options:{autoSpeed:{title:"Autoplay Speed",options:{slow:"Slow",medium:"Medium",fast:"Fast"}},language:{title:"Language"},resetData:{title:"Clear or Reset Data",options:{clearGameSave:"Clear game saving",resetSettings:"Reset settings",clearAll:"Clear all data"},dialogs:{clearGameSave:"Are you sure you want to clear game saving",resetSettings:"Are you sure you want to reset all settings",clearAll:"Are you sure you want to clear all data"}},gameSave:{title:"Import or Export Game Saving and Options",options:{export:"Export game saving and options",import:"Import game saving and options"},dialogs:{import:{title:"Are you sure you want to import game saving and options",tip:"Import game saving",error:"Parse game saving failed"}}},about:{title:"About WebGAL",subTitle:"WebGAL: An Open-Source Web-Based Visual Novel Engine",version:"Version",source:"Source Code Repository",contributors:"Contributors",website:"Website"}}},display:{title:"Display",options:{fullScreen:{title:"Full Screen",options:{on:"ON",off:"OFF"}},textSpeed:{title:"Text Speed",options:{slow:"Slow",medium:"Medium",fast:"Fast"}},textSize:{title:"Text Size",options:{small:"Small",medium:"Medium",large:"Large"}},textFont:{title:"Text Font",options:{siYuanSimSun:"Source Han Serif",SimHei:"Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"Textbox Opacity"},textPreview:{title:"Preview Text Showing",text:"You are previewing the text's font, size and playback speed, now. You can adjust the above options according to your perception."}}},sound:{title:"Sound",options:{volumeMain:{title:"Main Volume"},vocalVolume:{title:"Vocal Volume"},bgmVolume:{title:"BGM Volume"},seVolume:{title:"Sound Effects Volume"},uiSeVolume:{title:"UI Sound Effects Volume"}}}}},saving:{title:"SAVE",isOverwrite:"Are you sure you want to overwrite this save?"},loadSaving:{title:"LOAD"},title:{title:"TITLE"},exit:{title:"BACK"}},title:{start:{title:"START",subtitle:""},continue:{title:"CONTINUE",subtitle:""},options:{title:"OPTIONS",subtitle:""},load:{title:"LOAD",subtitle:""},extra:{title:"EXTRA",subtitle:""}},gaming:{noSaving:"No saving",buttons:{hide:"Hide",show:"Show",backlog:"Backlog",replay:"Replay",auto:"Auto",forward:"Forward",quicklySave:"Quickly Save",quicklyLoad:"Quickly Load",save:"Save",load:"Load",options:"Options",title:"Title",titleTips:"Confirm return to the title screen"}},extra:{title:"EXTRA"}},rW={common:{yes:"はい",no:"いいえ"},menu:{options:{title:"CONFIG",pages:{system:{title:"システム",options:{autoSpeed:{title:"自動再生速度",options:{slow:"遅く",medium:"標準",fast:"速く"}},language:{title:"言語"},resetData:{title:"データの復元と削除",options:{clearGameSave:"すべてのセーブデータを削除",resetSettings:"設定を元に戻す",clearAll:"すべてのデータを削除"},dialogs:{clearGameSave:"すべてのセーブデータを削除しますか?",resetSettings:"設定を元に戻しますか?",clearAll:"すべてのデータを削除しますか?"}},gameSave:{title:"セーブデータと設定のインポートとエクスポート",options:{export:"セーブデータと設定のエクスポート",import:"セーブデータと設定のインポート"},dialogs:{import:{title:"セーブデータと設定をインポートしますか?",tip:"セーブデータのインポート",error:"セーブデータの読み込みに失敗しました"}}},about:{title:"WebGAL について",subTitle:"WebGAL: オープンソースのウェブベースビジュアルノベルエンジン",version:"バージョン",source:"ソースコードリポジトリ",contributors:"貢献者",website:"ウェブサイト"}}},display:{title:"ウィンドウ",options:{fullScreen:{title:"フルスクリーン",options:{on:"オン",off:"オフ"}},textSpeed:{title:"テキスト表示速度",options:{slow:"遅く",medium:"標準",fast:"速く"}},textSize:{title:"テキストサイズ",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"フォント",options:{siYuanSimSun:"源ノ明朝(中国語)",SimHei:"OPPO Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"テキストボックスの不透明度"},textPreview:{title:"テキスト表示プレビュー",text:"これはテキストボックスのフォントとサイズ、表示速度のプレビューです。上にある設定で変更できます。"}}},sound:{title:"サウンド",options:{volumeMain:{title:"メイン音量"},vocalVolume:{title:"ボイス音量"},bgmVolume:{title:"BGM 音量"},seVolume:{title:"効果音音量"},uiSeVolume:{title:"UI 効果音音量"},voiceOption:{title:"ボイスの中断"},voiceStop:{title:"中断する"},voiceContinue:{title:"中断しない"}}}}},saving:{title:"SAVE",isOverwrite:"セーブデータを上書きしますか?"},loadSaving:{title:"LOAD"},title:{title:"HOME"},exit:{title:"BACK"}},title:{start:{title:"初めから",subtitle:"START"},continue:{title:"続きから",subtitle:"CONTINUE"},options:{title:"設定",subtitle:"CONFIG"},load:{title:"ロード",subtitle:"LOAD"},extra:{title:"鑑賞モード",subtitle:"EXTRA"}},gaming:{noSaving:"クイックセーブなし",buttons:{hide:"CLOSE",show:"SHOW",backlog:"LOG",replay:"REPLAY",auto:"AUTO",forward:"SKIP",quicklySave:"QUICK SAVE",quicklyLoad:"QUICK LOAD",save:"SAVE",load:"LOAD",options:"CONFIG",title:"HOME",titleTips:"タイトル画面に戻りますか?"}},extra:{title:"鑑賞モード"}},nW={common:{yes:"是",no:"否"},menu:{options:{title:"选项",pages:{system:{title:"系统",options:{autoSpeed:{title:"自动播放速度",options:{slow:"慢",medium:"中",fast:"快"}},language:{title:"语言"},resetData:{title:"清除或还原数据",options:{clearGameSave:"清除所有存档",resetSettings:"还原默认设置",clearAll:"清除所有数据"},dialogs:{clearGameSave:"确定要清除存档吗",resetSettings:"确定要还原默认设置吗",clearAll:"确定要清除所有数据吗"}},gameSave:{title:"导入或导出存档与选项",options:{export:"导出存档与选项",import:"导入存档与选项"},dialogs:{import:{title:"确定要导入存档与选项吗",tip:"导入存档",error:"存档解析失败"}}},about:{title:"关于 WebGAL",subTitle:"WebGAL:开源的网页端视觉小说引擎",version:"版本号",source:"源代码仓库",contributors:"贡献者",website:"网站"}}},display:{title:"显示",options:{fullScreen:{title:"全屏模式",options:{on:"开启",off:"关闭"}},textSpeed:{title:"文字显示速度",options:{slow:"慢",medium:"中",fast:"快"}},textSize:{title:"文本大小",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"文本字体",options:{siYuanSimSun:"思源宋体",SimHei:"黑体",lxgw:"霞鹜文楷"}},textboxOpacity:{title:"文本框不透明度"},textPreview:{title:"文本显示预览",text:"现在预览的是文本框字体大小和播放速度的情况,您可以根据您的观感调整上面的选项。"}}},sound:{title:"音频",options:{volumeMain:{title:"主音量"},vocalVolume:{title:"语音音量"},bgmVolume:{title:"背景音乐音量"},seVolume:{title:"音效音量"},uiSeVolume:{title:"用户界面音效音量"},voiceOption:{title:"是否中断语音"},voiceStop:{title:"停止语音"},voiceContinue:{title:"继续语音"}}}}},saving:{title:"存档",isOverwrite:"是否覆盖存档?"},loadSaving:{title:"读档"},title:{title:"标题",options:{load:"",extra:"鉴赏模式"}},exit:{title:"返回"}},title:{start:{title:"开始游戏",subtitle:"START"},continue:{title:"继续游戏",subtitle:"CONTINUE"},options:{title:"游戏选项",subtitle:"OPTIONS"},load:{title:"读取存档",subtitle:"LOAD"},extra:{title:"鉴赏模式",subtitle:"EXTRA"}},gaming:{noSaving:"暂无存档",buttons:{hide:"隐藏",show:"显示",backlog:"回想",replay:"重播",auto:"自动",forward:"快进",quicklySave:"快速存档",quicklyLoad:"快速读档",save:"存档",load:"读档",options:"选项",title:"标题",titleTips:"确认返回到标题界面吗"}},extra:{title:"鉴赏模式"}},iW={common:{yes:"OK",no:"Annuler"},menu:{options:{title:"OPTIONS",pages:{system:{title:"Système",options:{autoSpeed:{title:"Vitesse de lecture automatique",options:{slow:"Lente",medium:"Moyenne",fast:"Rapide"}},language:{title:"Langue"},resetData:{title:"Effacer ou réinitialiser les données",options:{clearGameSave:"Effacer la sauvegarde du jeu",resetSettings:"Réinitialiser les paramètres",clearAll:"Tout effacer"},dialogs:{clearGameSave:"Êtes-vous sûr de vouloir effacer la sauvegarde du jeu",resetSettings:"Êtes-vous sûr de vouloir réinitialiser tous les paramètres",clearAll:"Êtes-vous sûr de vouloir tout effacer"}},gameSave:{title:"Importer ou exporter la sauvegarde du jeu et les options",options:{export:"Exporter la sauvegarde du jeu et les options",import:"Importer la sauvegarde du jeu et les options"},dialogs:{import:{title:"Êtes-vous sûr de vouloir importer la sauvegarde du jeu et les options",tip:"Importer la sauvegarde du jeu",error:"Impossible d'analyser la sauvegarde du jeu"}}},about:{title:"À propos de WebGAL",subTitle:"WebGAL: Un moteur de visual novel basé sur le web en open-source",version:"Version",source:"Dépôt de code source",contributors:"Contributeurs",website:"Site web"}}},display:{title:"Affichage",options:{textSpeed:{title:"Vitesse d'affichage du texte",options:{slow:"Lente",medium:"Moyenne",fast:"Rapide"}},textSize:{title:"Taille du texte",options:{small:"Petite",medium:"Moyenne",large:"Grande"}},textFont:{title:"Police du texte",options:{siYuanSimSun:"Source Han Serif",SimHei:"Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"Textbox Opacity"},textPreview:{title:"Aperçu de l'affichage du texte",text:"Vous prévisualisez la police, la taille et la vitesse de lecture du texte, maintenant. Vous pouvez ajuster les options ci-dessus selon votre perception."}}},sound:{title:"Son",options:{volumeMain:{title:"Volume principal"},vocalVolume:{title:"Volume des voix"},bgmVolume:{title:"Volume de la musique de fond"},seVolume:{title:"Volume des effets sonores"},uiSeVolume:{title:"Volume de l’interface utilisateur"}}}}},saving:{title:"SAUVEGARDER",isOverwrite:"Êtes-vous sûr de vouloir écraser cette sauvegarde ?"},loadSaving:{title:"CHARGER"},title:{title:"TITRE"},exit:{title:"RETOUR"}},title:{start:{title:"COMMENCER",subtitle:""},continue:{title:"CONTINUER",subtitle:""},options:{title:"OPTIONS",subtitle:""},load:{title:"CHARGER",subtitle:""},extra:{title:"EXTRA",subtitle:""}},gaming:{noSaving:"Aucune sauvegarde",buttons:{hide:"Masquer",show:"Afficher",backlog:"Journal",replay:"Rejouer",auto:"Automatique",forward:"Avancer",quicklySave:"Sauvegarde rapide",quicklyLoad:"Chargement rapide",save:"Sauvegarder",load:"Charger",options:"Options",title:"Titre",titleTips:"Confirmer le retour à l'écran titre"}},extra:{title:"EXTRA"}},aW={common:{yes:"Ja",no:"Nein"},menu:{options:{title:"OPTIONEN",pages:{system:{title:"System",options:{autoSpeed:{title:"Auto-Geschwindigkeit",options:{slow:"Langsam",medium:"Normal",fast:"Schnell"}},language:{title:"Sprache"},resetData:{title:"Daten löschen oder zurücksetzen",options:{clearGameSave:"Alle Spielstände löschen",resetSettings:"Alle Einstellungen zurücksetzen",clearAll:"Alle Daten löschen"},dialogs:{clearGameSave:"Sind Sie sicher, dass Sie den Spielstand löschen möchten?",resetSettings:"Sind Sie sicher, dass Sie alle Einstellungen zurücksetzen möchten?",clearAll:"Sind Sie sicher, dass Sie alle Daten löschen möchten?"}},gameSave:{title:"Spielstand und Optionen importieren oder exportieren",options:{export:"Spielstand und Optionen exportieren",import:"Spielstand und Optionen importieren"},dialogs:{import:{title:"Sind Sie sicher, dass Sie den Spielstand und die Optionen importieren möchten?",tip:"Spielstand importieren",error:"Ein Fehler ist beim Analysieren des Spielstands aufgetreten"}}},about:{title:"Über WebGAL",subTitle:"WebGAL: Eine Open-Source Web-Based Visual Novel Engine",version:"Version",source:"Source Code Repository",contributors:"Contributors",website:"Website"}}},display:{title:"Darstellung",options:{textSpeed:{title:"Geschwindigkeit der Textanzeige",options:{slow:"Langsam",medium:"Normal",fast:"Schnell"}},textSize:{title:"Textgröße",options:{small:"Klein",medium:"Normal",large:"Groß"}},textFont:{title:"Schriftart",options:{siYuanSimSun:"Source Han Serif",SimHei:"Sans",lxgw:"LXGW WenKai"}},textboxOpacity:{title:"Textbox Opacity"},textPreview:{title:"Vorschautext wird angezeigt",text:"Sie können jederzeit die Schriftart, Größe und Wiedergabegeschwindigkeit des Textes nach Ihrer Vorliebe anpassen."}}},sound:{title:"Ton",options:{volumeMain:{title:"Hauptlautstärke"},vocalVolume:{title:"Stimmlautstärke"},bgmVolume:{title:"Musiklautstärke"},seVolume:{title:"Soundeffektlautstärke"},uiSeVolume:{title:"UI Soundeffektlautstärke"}}}}},saving:{title:"SPEICHERN",isOverwrite:"Sind Sie sicher, dass Sie diesen Spielstand überschreiben möchten?"},loadSaving:{title:"LADEN"},title:{title:"TITEL"},exit:{title:"ZURÜCK"}},title:{start:{title:"STARTEN",subtitle:""},continue:{title:"WEITERLESEN",subtitle:""},options:{title:"OPTIONEN",subtitle:""},load:{title:"LADEN",subtitle:""},extra:{title:"EXTRA",subtitle:""}},gaming:{noSaving:"Keine Speicherung",buttons:{hide:"Verstecken",show:"Anzeigen",backlog:"Verlauf",replay:"Wiedergabe",auto:"Auto",forward:"Überspringen",quicklySave:"Quickly Save",quicklyLoad:"Quickly Load",save:"Speichern",load:"Laden",options:"Optionen",title:"Titel"}},extra:{title:"EXTRA"}},oW={common:{yes:"是",no:"否"},menu:{options:{title:"選項",pages:{system:{title:"系統",options:{autoSpeed:{title:"自動播放速度",options:{slow:"慢",medium:"中",fast:"快"}},language:{title:"語言"},resetData:{title:"清除或還原數據",options:{clearGameSave:"清除所有存檔",resetSettings:"還原默認設定",clearAll:"清除所有數據"},dialogs:{clearGameSave:"確定要清除存檔嗎",resetSettings:"確定要還原默認設定嗎",clearAll:"確定要清除所有數據嗎"}},gameSave:{title:"導入或導出存檔與選項",options:{export:"導出存檔與選項",import:"導入存檔與選項"},dialogs:{import:{title:"確定要導入存檔與選項嗎",tip:"導入存檔",error:"存檔解析失敗"}}},about:{title:"關於 WebGAL",subTitle:"WebGAL:開源的線上視覺小說製作引擎",version:"版本號",source:"源代碼倉庫",contributors:"貢獻者",website:"網站"}}},display:{title:"顯示",options:{textSpeed:{title:"文字顯示速度",options:{slow:"慢",medium:"中",fast:"快"}},textSize:{title:"文字大小",options:{small:"小",medium:"中",large:"大"}},textFont:{title:"文字字體",options:{siYuanSimSun:"霞鹜文楷",SimHei:"黑體"}},textboxOpacity:{title:"文本框不透明度"},textPreview:{title:"文字顯示預覽",text:"現在預覽的是文字框字體大小和播放速度的情況,您可以根據您的觀感調整上面的選項。"}}},sound:{title:"音量",options:{volumeMain:{title:"主音量"},vocalVolume:{title:"語音音量"},bgmVolume:{title:"背景音樂音量"},seVolume:{title:"音效音量"},uiSeVolume:{title:"用戶界面音效音量"}}}}},saving:{title:"存檔",isOverwrite:"是否要覆蓋存檔?"},loadSaving:{title:"讀檔"},title:{title:"標題",options:{load:"",extra:"CG模式"}},exit:{title:"返回"}},title:{start:{title:"開始遊戲",subtitle:"START"},continue:{title:"繼續遊戲",subtitle:"CONTINUE"},options:{title:"遊戲選項",subtitle:"OPTIONS"},load:{title:"讀取存檔",subtitle:"LOAD"},extra:{title:"CG模式",subtitle:"EXTRA"}},gaming:{noSaving:"暫無存檔",buttons:{hide:"隱藏",show:"顯示",backlog:"回想",replay:"重播",auto:"自動",forward:"加速",quicklySave:"快速存檔",quicklyLoad:"快速讀檔",save:"存檔",load:"讀檔",options:"選項",title:"標題",titleTips:"確認返回到標題界面嗎"}},extra:{title:"CG模式"}};var Is=(t=>(t[t.zhCn=0]="zhCn",t[t.en=1]="en",t[t.jp=2]="jp",t[t.fr=3]="fr",t[t.de=4]="de",t[t.zhTw=5]="zhTw",t))(Is||{});const ip={zhCn:"中文",en:"English",jp:"日本語",fr:"Français",de:"Deutsch",zhTw:"繁體中文"},sW={en:{translation:tW},zhCn:{translation:nW},jp:{translation:rW},fr:{translation:iW},de:{translation:aW},zhTw:{translation:oW}},lW=0;var hn=(t=>(t[t.slow=0]="slow",t[t.normal=1]="normal",t[t.fast=2]="fast",t))(hn||{}),ti=(t=>(t[t.small=0]="small",t[t.medium=1]="medium",t[t.large=2]="large",t))(ti||{}),Zi=(t=>(t[t.song=0]="song",t[t.hei=1]="hei",t[t.lxgw=2]="lxgw",t))(Zi||{}),zc=(t=>(t[t.yes=0]="yes",t[t.no=1]="no",t))(zc||{}),Qi=(t=>(t[t.on=0]="on",t[t.off=1]="off",t))(Qi||{});const Gk={slPage:1,volumeMain:100,textSpeed:hn.normal,autoSpeed:hn.normal,textSize:ti.medium,vocalVolume:100,bgmVolume:25,seVolume:100,uiSeVolume:50,textboxFont:Zi.song,textboxOpacity:75,language:Is.zhCn,voiceInterruption:zc.yes,fullScreen:Qi.off},Z0={optionData:Gk,scriptManagedGlobalVar:[],globalGameVar:{},appreciationData:{bgm:[],cg:[]}},Xk=Qp({name:"userData",initialState:zt(Z0),reducers:{setUserData:(t,e)=>{const{key:r,value:n}=e.payload;t[r]=n},unlockCgInUserData:(t,e)=>{const{name:r,url:n,series:i}=e.payload;let a=!1;t.appreciationData.cg.forEach(o=>{n===o.url&&(a=!0,o.url=n,o.series=i)}),a||t.appreciationData.cg.push(e.payload)},unlockBgmInUserData:(t,e)=>{const{name:r,url:n,series:i}=e.payload;let a=!1;t.appreciationData.bgm.forEach(o=>{n===o.url&&(a=!0,o.url=n,o.series=i)}),a||t.appreciationData.bgm.push(e.payload)},resetUserData:(t,e)=>{Object.assign(t,e.payload)},setOptionData:(t,e)=>{const{key:r,value:n}=e.payload;t.optionData[r]=n},setGlobalVar:(t,e)=>{t.scriptManagedGlobalVar.findIndex(n=>n===e.payload.key)>=0||(t.globalGameVar[e.payload.key]=e.payload.value)},setScriptManagedGlobalVar:(t,e)=>{const r=t.scriptManagedGlobalVar.findIndex(n=>n===e.payload.key)>=0;t.globalGameVar[e.payload.key]=e.payload.value,r||t.scriptManagedGlobalVar.push(e.payload.key)},setSlPage:(t,e)=>{t.optionData.slPage=e.payload},resetOptionSet(t){Object.assign(t.optionData,Gk)},resetAllData(t){Object.assign(t,zt(Z0))}}}),{setUserData:_we,resetUserData:jb,setOptionData:Ct,setGlobalVar:pC,setScriptManagedGlobalVar:uW,setSlPage:zk,unlockCgInUserData:Wk,unlockBgmInUserData:Yk,resetOptionSet:cW,resetAllData:fW}=Xk.actions,hW=Xk.reducer,Hk={backlog_size:200,fast_timeout:50},dW={textInitialDelay:80};class pW{constructor(e){Ae(this,"isSaveBacklogNext",!1);Ae(this,"backlog",[]);Ae(this,"sceneManager");this.sceneManager=e}getBacklog(){return this.backlog}editLastBacklogItemEffect(e){this.backlog[this.backlog.length-1].currentStageState.effects=e}makeBacklogEmpty(){this.backlog.splice(0,this.backlog.length)}insertBacklogItem(e){this.backlog.push(e)}saveCurrentStateToBacklog(){const e=te.getState().stage,r=zt(e);r.PerformList.forEach(i=>{i.script.args.forEach(a=>{a.key==="concat"&&(a.value=!1,i.script.content=r.showText)})});const n={currentStageState:r,saveScene:{currentSentenceId:this.sceneManager.sceneData.currentSentenceId,sceneStack:zt(this.sceneManager.sceneData.sceneStack),sceneName:this.sceneManager.sceneData.currentScene.sceneName,sceneUrl:this.sceneManager.sceneData.currentScene.sceneUrl}};for(this.getBacklog().push(n);this.getBacklog().length>Hk.backlog_size;)this.getBacklog().shift()}}const vC={currentSentenceId:0,sceneStack:[],currentScene:{sceneName:"",sceneUrl:"",sentenceList:[],assetsList:[],subSceneList:[]}};class vW{constructor(){Ae(this,"settledScenes",[]);Ae(this,"settledAssets",[]);Ae(this,"sceneData",zt(vC));Ae(this,"lockSceneWrite",!1)}resetScene(){this.sceneData.currentSentenceId=0,this.sceneData.sceneStack=[],this.sceneData.currentScene=zt(vC.currentScene)}}class mW{constructor(){Ae(this,"nextEnterAnimationName",new Map);Ae(this,"nextExitAnimationName",new Map);Ae(this,"animations",[])}addAnimation(e){this.animations.push(e)}getAnimations(){return this.animations}}const gW={performName:"",duration:100,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0};var Fn=(t=>(t[t.background=0]="background",t[t.bgm=1]="bgm",t[t.figure=2]="figure",t[t.scene=3]="scene",t[t.tex=4]="tex",t[t.vocal=5]="vocal",t[t.video=6]="video",t))(Fn||{});const Nn=(t,e)=>{if(t.match("http://")||t.match("https://"))return t;{let r;switch(e){case 0:r=`./game/background/${t}`;break;case 3:r=`./game/scene/${t}`;break;case 5:r=`./game/vocal/${t}`;break;case 2:r=`./game/figure/${t}`;break;case 1:r=`./game/bgm/${t}`;break;case 6:r=`./game/video/${t}`;break;default:r="";break}return r}},yW=t=>{for(const e of t)if(L.sceneManager.settledAssets.includes(e.url))ge.debug(`该资源${e.url}已在预加载列表中,无需重复加载`);else{const n=document.createElement("link");n.setAttribute("rel","prefetch"),n.setAttribute("href",e.url);const i=document.getElementsByTagName("head");if(i.length)try{i[0].appendChild(n)}catch(a){console.log("预加载出错",a)}L.sceneManager.settledAssets.push(e.url)}};var Te;(function(t){t[t.say=0]="say",t[t.changeBg=1]="changeBg",t[t.changeFigure=2]="changeFigure",t[t.bgm=3]="bgm",t[t.video=4]="video",t[t.pixi=5]="pixi",t[t.pixiInit=6]="pixiInit",t[t.intro=7]="intro",t[t.miniAvatar=8]="miniAvatar",t[t.changeScene=9]="changeScene",t[t.choose=10]="choose",t[t.end=11]="end",t[t.setComplexAnimation=12]="setComplexAnimation",t[t.setFilter=13]="setFilter",t[t.label=14]="label",t[t.jumpLabel=15]="jumpLabel",t[t.chooseLabel=16]="chooseLabel",t[t.setVar=17]="setVar",t[t.if=18]="if",t[t.callScene=19]="callScene",t[t.showVars=20]="showVars",t[t.unlockCg=21]="unlockCg",t[t.unlockBgm=22]="unlockBgm",t[t.filmMode=23]="filmMode",t[t.setTextbox=24]="setTextbox",t[t.setAnimation=25]="setAnimation",t[t.playEffect=26]="playEffect",t[t.setTempAnimation=27]="setTempAnimation",t[t.comment=28]="comment",t[t.setTransform=29]="setTransform",t[t.setTransition=30]="setTransition",t[t.getUserInput=31]="getUserInput",t[t.applyStyle=32]="applyStyle"})(Te||(Te={}));Te.intro,Te.changeBg,Te.changeFigure,Te.miniAvatar,Te.changeScene,Te.choose,Te.end,Te.bgm,Te.video,Te.setComplexAnimation,Te.setFilter,Te.pixiInit,Te.pixi,Te.label,Te.jumpLabel,Te.setVar,Te.callScene,Te.showVars,Te.unlockCg,Te.unlockBgm,Te.say,Te.filmMode,Te.callScene,Te.setTextbox,Te.setAnimation,Te.playEffect,Te.applyStyle;Te.bgm,Te.pixi,Te.pixiInit,Te.label,Te.if,Te.miniAvatar,Te.setVar,Te.unlockBgm,Te.unlockCg,Te.filmMode,Te.playEffect;var nr;(function(t){t[t.background=0]="background",t[t.bgm=1]="bgm",t[t.figure=2]="figure",t[t.scene=3]="scene",t[t.tex=4]="tex",t[t.vocal=5]="vocal",t[t.video=6]="video"})(nr||(nr={}));function qk(t,e){const r=[];let i=t.replace(/ /g," ").split(" -");return i=i.filter(a=>a!==""),i.forEach(a=>{const o=a.indexOf("=");let s=a.slice(0,o),u=a.slice(o+1);o<0&&(s=a,u=void 0),s.toLowerCase().match(/.ogg|.mp3|.wav/)?r.push({key:"vocal",value:e(a,nr.vocal)}):u===void 0?r.push({key:s,value:!0}):u==="true"||u==="false"?r.push({key:s,value:u==="true"}):isNaN(Number(u))?r.push({key:s,value:u}):r.push({key:s,value:Number(u)})}),r}function _W(t){const e=[];let r,n=t.split(";")[0];if(n==="")return{command:"",args:[],options:[]};const i=/\s*:\s*/.exec(n);i===null?r="":(r=n.substring(0,i.index),n=n.substring(i.index+1,n.length));const a=/ -/.exec(n);if(a){const o=n.substring(a.index,n.length);n=n.substring(0,a.index);for(const s of qk(o,(u,l)=>u))e.push(s)}return{command:r,args:n.split("|").map(o=>o.trim()).filter(o=>o!==""),options:e}}function xW(t){return t.replaceAll("\r","").split(` +`).map(r=>_W(r)).filter(r=>r.command!=="")}const mC=(t,e,r)=>{let n={type:Te.say,additionalArgs:[]};const i=bW(t,e,r);return n.type=i,i===Te.say&&t!=="say"&&n.additionalArgs.push({key:"speaker",value:t}),n=SW(n,i,e),n};function bW(t,e,r){var n;return((n=r.get(t))==null?void 0:n.scriptType)??Te.say}function SW(t,e,r){return r.includes(e)&&t.additionalArgs.push({key:"next",value:!0}),t}const wW=(t,e,r)=>{if(t==="none"||t==="")return"";switch(e){case Te.playEffect:return r(t,nr.vocal);case Te.changeBg:return r(t,nr.background);case Te.changeFigure:return r(t,nr.figure);case Te.bgm:return r(t,nr.bgm);case Te.callScene:return r(t,nr.scene);case Te.changeScene:return r(t,nr.scene);case Te.miniAvatar:return r(t,nr.figure);case Te.video:return r(t,nr.video);case Te.choose:return EW(t,r);case Te.unlockBgm:return r(t,nr.bgm);case Te.unlockCg:return r(t,nr.background);default:return t}};function EW(t,e){const r=t.split(new RegExp("(?s.match(/\./)?e(s,nr.scene):s);let o="";for(let s=0;s{const n=[];return t===Te.say&&r.forEach(i=>{i.key==="vocal"&&n.push({name:i.value,url:i.value,lineNumber:0,type:nr.vocal})}),e==="none"||e===""||(t===Te.changeBg&&n.push({name:e,url:e,lineNumber:0,type:nr.background}),t===Te.changeFigure&&n.push({name:e,url:e,lineNumber:0,type:nr.figure}),t===Te.miniAvatar&&n.push({name:e,url:e,lineNumber:0,type:nr.figure}),t===Te.video&&n.push({name:e,url:e,lineNumber:0,type:nr.video}),t===Te.bgm&&n.push({name:e,url:e,lineNumber:0,type:nr.bgm})),n},AW=(t,e)=>{const r=[];return(t===Te.changeScene||t===Te.callScene)&&r.push(e),t===Te.choose&&e.split("|").map(a=>a.split(":")[1]??"").forEach(a=>{a.match(/\./)&&r.push(a)}),r},CW=(t,e,r,n)=>{let i,a,o;const s=[];let u,l,c,f=t.split(new RegExp("(?-1}var xH=_H,bH=dv;function SH(t,e){var r=this.__data__,n=bH(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var wH=SH,EH=aH,TH=pH,AH=gH,CH=xH,PH=wH;function cu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}var Pq=Cq;function Oq(t,e,r){for(var n=-1,i=t==null?0:t.length;++n=Zq){var l=e?null:qq(t);if(l)return Kq(l);o=!1,i=Hq,u=new zq}else u=e?[]:s;e:for(;++n{const u=t.split(` +`);let l=[],c=[];const f=u.map(h=>{const d=CW(h,i,a,o);return l=[...l,...d.sentenceAssets],c=[...c,...d.subScene],d});return l=r7(l),n(l),{sceneName:e,sceneUrl:r,sentenceList:f,assetsList:l,subSceneList:c}};function i7(t){const[e,r]=a7(t);return{classNameStyles:e,others:r}}function a7(t){const e={};let r="",n;const i=/\.([^{\s]+)\s*{((?:[^{}]*|{[^}]*})*)}/g,a=/(@[^{]+{\s*(?:[^{}]*{[^}]*}[^{}]*)+\s*})/g;for(;(n=i.exec(t))!==null;){const o=n[1],s=n[2].trim().replace(/\s*;\s*/g,`; `);e[o]=s}for(;(n=a.exec(t))!==null;)r+=n[1].trim()+` -`;return[e,r.trim()]}class a7{constructor(e,r,n,i){Ae(this,"assetsPrefetcher");Ae(this,"assetSetter");Ae(this,"ADD_NEXT_ARG_LIST");Ae(this,"SCRIPT_CONFIG_MAP");this.assetsPrefetcher=e,this.assetSetter=r,this.ADD_NEXT_ARG_LIST=n,Array.isArray(i)?(this.SCRIPT_CONFIG_MAP=new Map,i.forEach(a=>{this.SCRIPT_CONFIG_MAP.set(a.scriptString,a)})):this.SCRIPT_CONFIG_MAP=i}parse(e,r,n){return r7(e,r,n,this.assetsPrefetcher,this.assetSetter,this.ADD_NEXT_ARG_LIST,this.SCRIPT_CONFIG_MAP)}parseConfig(e){return _W(e)}stringifyConfig(e){return e.reduce((r,n)=>r+`${n.command}:${n.args.join("|")}${n.options.length<=0?"":n.options.reduce((i,a)=>i+" -"+a.key+"="+a.value,"")}; -`,"")}parseScssToWebgalStyleObj(e){return n7(e)}}function He(t,e){const n=t.args.find(i=>i.key===e);return n?n.value:null}const o7=t=>{let e=t.content,r="",n="default";t.args.forEach(o=>{o.key==="unlockname"&&(r=o.value.toString()),o.key==="series"&&(n=o.value.toString())});const i=He(t,"enter"),a=He(t,"volume");return r!==""&&te.dispatch(Wk({name:r,url:e,series:n})),AS(e,typeof i=="number"&&i>=0?i:0,typeof a=="number"&&a>=0&&a<=100?a:100),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};var Ub={exports:{}},Jk=function(e,r){return function(){return e.apply(r,arguments)}},s7=Jk,$b=Object.prototype.toString,Vb=function(t){return function(e){var r=$b.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function Io(t){return t=t.toLowerCase(),function(r){return Vb(r)===t}}function vv(t){return Array.isArray(t)}function Z0(t){return typeof t>"u"}function l7(t){return t!==null&&!Z0(t)&&t.constructor!==null&&!Z0(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}var eM=Io("ArrayBuffer");function u7(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&eM(t.buffer),e}function c7(t){return typeof t=="string"}function tM(t){return typeof t=="number"}function rM(t){return t!==null&&typeof t=="object"}function fd(t){if(Vb(t)!=="object")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function f7(t){return t&&Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}var h7=Io("Date"),d7=Io("File"),p7=Io("Blob"),v7=Io("FileList");function Gb(t){return $b.call(t)==="[object Function]"}function m7(t){return rM(t)&&Gb(t.pipe)}function g7(t){var e="[object FormData]";return t&&(typeof FormData=="function"&&t instanceof FormData||$b.call(t)===e||Gb(t.toString)&&t.toString()===e)}var y7=Io("URLSearchParams");function _7(t){return t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function x7(){var t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Xb(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),vv(t))for(var r=0,n=t.length;r0;)o=i[a],(!n||n(o,t,e))&&!s[o]&&(e[o]=t[o],s[o]=!0);t=r!==!1&&Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e}function T7(t,e,r){t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;var n=t.indexOf(e,r);return n!==-1&&n===r}function A7(t){if(!t)return null;if(vv(t))return t;var e=t.length;if(!tM(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r}var C7=function(t){return function(e){return t&&e instanceof t}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));function P7(t,e){for(var r=t&&t[Symbol.iterator],n=r.call(t),i;(i=n.next())&&!i.done;){var a=i.value;e.call(t,a[0],a[1])}}function O7(t,e){for(var r,n=[];(r=t.exec(e))!==null;)n.push(r);return n}var R7=Io("HTMLFormElement"),I7=function(e){return function(r,n){return e.call(r,n)}}(Object.prototype.hasOwnProperty),_r={isArray:vv,isArrayBuffer:eM,isBuffer:l7,isFormData:g7,isArrayBufferView:u7,isString:c7,isNumber:tM,isObject:rM,isPlainObject:fd,isEmptyObject:f7,isUndefined:Z0,isDate:h7,isFile:d7,isBlob:p7,isFunction:Gb,isStream:m7,isURLSearchParams:y7,isStandardBrowserEnv:x7,forEach:Xb,merge:Q0,extend:b7,trim:_7,stripBOM:S7,inherits:w7,toFlatObject:E7,kindOf:Vb,kindOfTest:Io,endsWith:T7,toArray:A7,isTypedArray:C7,isFileList:v7,forEachEntry:P7,matchAll:O7,isHTMLForm:R7,hasOwnProperty:I7},nM=_r;function Ll(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}nM.inherits(Ll,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var iM=Ll.prototype,aM={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(t){aM[t]={value:t}});Object.defineProperties(Ll,aM);Object.defineProperty(iM,"isAxiosError",{value:!0});Ll.from=function(t,e,r,n,i,a){var o=Object.create(iM);return nM.toFlatObject(t,o,function(u){return u!==Error.prototype}),Ll.call(o,t.message,e,r,n,i),o.cause=t,o.name=t.name,a&&Object.assign(o,a),o};var ks=Ll,k7=typeof self=="object"?self.FormData:window.FormData,M7=k7,bt=_r,F7=ks,N7=M7;function J0(t){return bt.isPlainObject(t)||bt.isArray(t)}function oM(t){return bt.endsWith(t,"[]")?t.slice(0,-2):t}function SC(t,e,r){return t?t.concat(e).map(function(i,a){return i=oM(i),!r&&a?"["+i+"]":i}).join(r?".":""):e}function L7(t){return bt.isArray(t)&&!t.some(J0)}var D7=bt.toFlatObject(bt,{},null,function(e){return/^is[A-Z]/.test(e)});function B7(t){return t&&bt.isFunction(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator]}function j7(t,e,r){if(!bt.isObject(t))throw new TypeError("target must be an object");e=e||new(N7||FormData),r=bt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!bt.isUndefined(g[v])});var n=r.metaTokens,i=r.visitor||c,a=r.dots,o=r.indexes,s=r.Blob||typeof Blob<"u"&&Blob,u=s&&B7(e);if(!bt.isFunction(i))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(bt.isDate(p))return p.toISOString();if(!u&&bt.isBlob(p))throw new F7("Blob is not supported. Use a Buffer instead.");return bt.isArrayBuffer(p)||bt.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,v,g){var m=p;if(p&&!g&&typeof p=="object"){if(bt.endsWith(v,"{}"))v=n?v:v.slice(0,-2),p=JSON.stringify(p);else if(bt.isArray(p)&&L7(p)||bt.isFileList(p)||bt.endsWith(v,"[]")&&(m=bt.toArray(p)))return v=oM(v),m.forEach(function(_,x){!bt.isUndefined(_)&&e.append(o===!0?SC([v],x,a):o===null?v:v+"[]",l(_))}),!1}return J0(p)?!0:(e.append(SC(g,v,a),l(p)),!1)}var f=[],h=Object.assign(D7,{defaultVisitor:c,convertValue:l,isVisitable:J0});function d(p,v){if(!bt.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(p),bt.forEach(p,function(m,y){var _=!bt.isUndefined(m)&&i.call(e,m,bt.isString(y)?y.trim():y,v,h);_===!0&&d(m,v?v.concat(y):[y])}),f.pop()}}if(!bt.isObject(t))throw new TypeError("data must be an object");return d(t),e}var mv=j7,U7=mv;function wC(t){var e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'\(\)~]|%20|%00/g,function(n){return e[n]})}function sM(t,e){this._pairs=[],t&&U7(t,this,e)}var lM=sM.prototype;lM.append=function(e,r){this._pairs.push([e,r])};lM.toString=function(e){var r=e?function(n){return e.call(this,n,wC)}:wC;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var uM=sM,$7=_r,V7=uM;function G7(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var cM=function(e,r,n){if(!r)return e;var i=e.indexOf("#");i!==-1&&(e=e.slice(0,i));var a=n&&n.encode||G7,o=$7.isURLSearchParams(r)?r.toString():new V7(r,n).toString(a);return o&&(e+=(e.indexOf("?")===-1?"?":"&")+o),e},X7=_r;function Bf(){this.handlers=[]}Bf.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};Bf.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Bf.prototype.clear=function(){this.handlers&&(this.handlers=[])};Bf.prototype.forEach=function(e){X7.forEach(this.handlers,function(n){n!==null&&e(n)})};var z7=Bf,W7=_r,fM=function(e,r){W7.forEach(e,function(i,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[a])})},hM={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Y7=uM,H7=typeof URLSearchParams<"u"?URLSearchParams:Y7,q7=FormData,K7={isBrowser:!0,classes:{URLSearchParams:H7,FormData:q7,Blob},protocols:["http","https","file","blob","url","data"]},zb=K7,Z7=_r,Q7=mv,EC=zb,J7=function(e,r){return Q7(e,new EC.classes.URLSearchParams,Object.assign({visitor:function(n,i,a,o){return EC.isNode&&Z7.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},r))},Xa=_r;function eK(t){return Xa.matchAll(/\w+|\[(\w*)]/g,t).map(function(e){return e[0]==="[]"?"":e[1]||e[0]})}function tK(t){var e={},r=Object.keys(t),n,i=r.length,a;for(n=0;n=n.length;if(s=!s&&Xa.isArray(a)?a.length:s,l)return Xa.hasOwnProperty(a,s)?a[s]=[a[s],i]:a[s]=i,!u;(!a[s]||!Xa.isObject(a[s]))&&(a[s]=[]);var c=e(n,i,a[s],o);return c&&Xa.isArray(a[s])&&(a[s]=tK(a[s])),!u}if(Xa.isFormData(t)&&Xa.isFunction(t.entries)){var r={};return Xa.forEachEntry(t,function(n,i){e(eK(n),i,r,0)}),r}return null}var dM=rK,Tg,TC;function nK(){if(TC)return Tg;TC=1;var t=ks;return Tg=function(r,n,i){var a=i.config.validateStatus;!i.status||!a||a(i.status)?r(i):n(new t("Request failed with status code "+i.status,[t.ERR_BAD_REQUEST,t.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))},Tg}var Ag,AC;function iK(){if(AC)return Ag;AC=1;var t=_r;return Ag=t.isStandardBrowserEnv()?function(){return{write:function(n,i,a,o,s,u){var l=[];l.push(n+"="+encodeURIComponent(i)),t.isNumber(a)&&l.push("expires="+new Date(a).toGMTString()),t.isString(o)&&l.push("path="+o),t.isString(s)&&l.push("domain="+s),u===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){var i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Ag}var aK=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},oK=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e},sK=aK,lK=oK,pM=function(e,r){return e&&!sK(r)?lK(e,r):r},Cg,CC;function uK(){if(CC)return Cg;CC=1;var t=_r,e=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Cg=function(n){var i={},a,o,s;return n&&t.forEach(n.split(` -`),function(l){if(s=l.indexOf(":"),a=t.trim(l.slice(0,s)).toLowerCase(),o=t.trim(l.slice(s+1)),a){if(i[a]&&e.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([o]):i[a]=i[a]?i[a]+", "+o:o}}),i},Cg}var Pg,PC;function cK(){if(PC)return Pg;PC=1;var t=_r;return Pg=t.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function a(o){var s=o;return r&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=a(window.location.href),function(s){var u=t.isString(s)?a(s):s;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),Pg}var Og,OC;function gv(){if(OC)return Og;OC=1;var t=ks,e=_r;function r(n,i,a){t.call(this,n??"canceled",t.ERR_CANCELED,i,a),this.name="CanceledError"}return e.inherits(r,t,{__CANCEL__:!0}),Og=r,Og}var Rg,RC;function fK(){return RC||(RC=1,Rg=function(e){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}),Rg}var Ig,IC;function kC(){if(IC)return Ig;IC=1;var t=_r,e=nK(),r=iK(),n=cM,i=pM,a=uK(),o=cK(),s=hM,u=ks,l=gv(),c=fK(),f=zb;return Ig=function(d){return new Promise(function(v,g){var m=d.data,y=d.headers,_=d.responseType,x=d.withXSRFToken,b;function S(){d.cancelToken&&d.cancelToken.unsubscribe(b),d.signal&&d.signal.removeEventListener("abort",b)}t.isFormData(m)&&t.isStandardBrowserEnv()&&delete y["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var E=d.auth.username||"",T=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";y.Authorization="Basic "+btoa(E+":"+T)}var A=i(d.baseURL,d.url);w.open(d.method.toUpperCase(),n(A,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function O(){if(w){var M="getAllResponseHeaders"in w?a(w.getAllResponseHeaders()):null,B=!_||_==="text"||_==="json"?w.responseText:w.response,j={data:B,status:w.status,statusText:w.statusText,headers:M,config:d,request:w};e(function(J){v(J),S()},function(J){g(J),S()},j),w=null}}if("onloadend"in w?w.onloadend=O:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(O)},w.onabort=function(){w&&(g(new u("Request aborted",u.ECONNABORTED,d,w)),w=null)},w.onerror=function(){g(new u("Network Error",u.ERR_NETWORK,d,w)),w=null},w.ontimeout=function(){var B=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",j=d.transitional||s;d.timeoutErrorMessage&&(B=d.timeoutErrorMessage),g(new u(B,j.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,d,w)),w=null},t.isStandardBrowserEnv()&&(x&&t.isFunction(x)&&(x=x(d)),x||x!==!1&&o(A))){var P=d.xsrfHeaderName&&d.xsrfCookieName&&r.read(d.xsrfCookieName);P&&(y[d.xsrfHeaderName]=P)}"setRequestHeader"in w&&t.forEach(y,function(B,j){typeof m>"u"&&j.toLowerCase()==="content-type"?delete y[j]:w.setRequestHeader(j,B)}),t.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),_&&_!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(b=function(M){w&&(g(!M||M.type?new l(null,d,req):M),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(b),d.signal&&(d.signal.aborted?b():d.signal.addEventListener("abort",b))),!m&&m!==!1&&m!==0&&m!==""&&(m=null);var k=c(A);if(k&&f.protocols.indexOf(k)===-1){g(new u("Unsupported protocol "+k+":",u.ERR_BAD_REQUEST,d));return}w.send(m)})},Ig}var fr=_r,MC=fM,FC=ks,hK=hM,dK=mv,pK=J7,NC=zb,vK=dM,mK={"Content-Type":"application/x-www-form-urlencoded"};function LC(t,e){!fr.isUndefined(t)&&fr.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function gK(){var t;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(t=kC()),t}function yK(t,e,r){if(fr.isString(t))try{return(e||JSON.parse)(t),fr.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var yv={transitional:hK,adapter:gK(),transformRequest:[function(e,r){MC(r,"Accept"),MC(r,"Content-Type");var n=r&&r["Content-Type"]||"",i=n.indexOf("application/json")>-1,a=fr.isObject(e);a&&fr.isHTMLForm(e)&&(e=new FormData(e));var o=fr.isFormData(e);if(o)return i?JSON.stringify(vK(e)):e;if(fr.isArrayBuffer(e)||fr.isBuffer(e)||fr.isStream(e)||fr.isFile(e)||fr.isBlob(e))return e;if(fr.isArrayBufferView(e))return e.buffer;if(fr.isURLSearchParams(e))return LC(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var s;if(a){if(n.indexOf("application/x-www-form-urlencoded")!==-1)return pK(e,this.formSerializer).toString();if((s=fr.isFileList(e))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return dK(s?{"files[]":e}:e,u&&new u,this.formSerializer)}}return a||i?(LC(r,"application/json"),yK(e)):e}],transformResponse:[function(e){var r=this.transitional||yv.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(e&&fr.isString(e)&&(n&&!this.responseType||i)){var a=r&&r.silentJSONParsing,o=!a&&i;try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?FC.from(s,FC.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:NC.classes.FormData,Blob:NC.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};fr.forEach(["delete","get","head"],function(e){yv.headers[e]={}});fr.forEach(["post","put","patch"],function(e){yv.headers[e]=fr.merge(mK)});var Wb=yv,_K=_r,xK=Wb,bK=function(e,r,n,i){var a=this||xK;return _K.forEach(i,function(s){e=s.call(a,e,r,n)}),e},kg,DC;function vM(){return DC||(DC=1,kg=function(e){return!!(e&&e.__CANCEL__)}),kg}var BC=_r,Mg=bK,SK=vM(),wK=Wb,EK=gv(),jC=fM;function Fg(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new EK}var TK=function(e){Fg(e),e.headers=e.headers||{},e.data=Mg.call(e,e.data,e.headers,null,e.transformRequest),jC(e.headers,"Accept"),jC(e.headers,"Content-Type"),e.headers=BC.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),BC.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||wK.adapter;return r(e).then(function(i){return Fg(e),i.data=Mg.call(e,i.data,i.headers,i.status,e.transformResponse),i},function(i){return SK(i)||(Fg(e),i&&i.response&&(i.response.data=Mg.call(e,i.response.data,i.response.headers,i.response.status,e.transformResponse))),Promise.reject(i)})},an=_r,mM=function(e,r){r=r||{};var n={};function i(c,f){return an.isPlainObject(c)&&an.isPlainObject(f)?an.merge(c,f):an.isEmptyObject(f)?an.merge({},c):an.isPlainObject(f)?an.merge({},f):an.isArray(f)?f.slice():f}function a(c){if(an.isUndefined(r[c])){if(!an.isUndefined(e[c]))return i(void 0,e[c])}else return i(e[c],r[c])}function o(c){if(!an.isUndefined(r[c]))return i(void 0,r[c])}function s(c){if(an.isUndefined(r[c])){if(!an.isUndefined(e[c]))return i(void 0,e[c])}else return i(void 0,r[c])}function u(c){if(c in r)return i(e[c],r[c]);if(c in e)return i(void 0,e[c])}var l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return an.forEach(Object.keys(e).concat(Object.keys(r)),function(f){var h=l[f]||a,d=h(f);an.isUndefined(d)&&h!==u||(n[f]=d)}),n},Ng,UC;function gM(){return UC||(UC=1,Ng={version:"0.28.0"}),Ng}var AK=gM().version,Wa=ks,Yb={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Yb[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var $C={};Yb.transitional=function(e,r,n){function i(a,o){return"[Axios v"+AK+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return function(a,o,s){if(e===!1)throw new Wa(i(o," has been removed"+(r?" in "+r:"")),Wa.ERR_DEPRECATED);return r&&!$C[o]&&($C[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};function CK(t,e,r){if(typeof t!="object")throw new Wa("options must be an object",Wa.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(t),i=n.length;i-- >0;){var a=n[i],o=e[a];if(o){var s=t[a],u=s===void 0||o(s,a,t);if(u!==!0)throw new Wa("option "+a+" must be "+u,Wa.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Wa("Unknown option "+a,Wa.ERR_BAD_OPTION)}}var PK={assertOptions:CK,validators:Yb},Hb=_r,OK=cM,VC=z7,GC=TK,_v=mM,RK=pM,yM=PK,$s=yM.validators;function Dl(t){this.defaults=t,this.interceptors={request:new VC,response:new VC}}Dl.prototype.request=function(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=_v(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&yM.assertOptions(n,{silentJSONParsing:$s.transitional($s.boolean),forcedJSONParsing:$s.transitional($s.boolean),clarifyTimeoutError:$s.transitional($s.boolean)},!1);var i=r.paramsSerializer;Hb.isFunction(i)&&(r.paramsSerializer={serialize:i});var a=[],o=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(r)===!1||(o=o&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});var s=[];this.interceptors.response.forEach(function(p){s.push(p.fulfilled,p.rejected)});var u;if(!o){var l=[GC,void 0];for(Array.prototype.unshift.apply(l,a),l=l.concat(s),u=Promise.resolve(r);l.length;)u=u.then(l.shift(),l.shift());return u}for(var c=r;a.length;){var f=a.shift(),h=a.shift();try{c=f(c)}catch(d){h(d);break}}try{u=GC(c)}catch(d){return Promise.reject(d)}for(;s.length;)u=u.then(s.shift(),s.shift());return u};Dl.prototype.getUri=function(e){e=_v(this.defaults,e);var r=RK(e.baseURL,e.url);return OK(r,e.params,e.paramsSerializer)};Hb.forEach(["delete","get","head","options"],function(e){Dl.prototype[e]=function(r,n){return this.request(_v(n||{},{method:e,url:r,data:(n||{}).data}))}});Hb.forEach(["post","put","patch"],function(e){function r(n){return function(a,o,s){return this.request(_v(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Dl.prototype[e]=r(),Dl.prototype[e+"Form"]=r(!0)});var IK=Dl,Lg,XC;function kK(){if(XC)return Lg;XC=1;var t=gv();function e(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(o){n=o});var i=this;this.promise.then(function(a){if(i._listeners){for(var o=i._listeners.length;o-- >0;)i._listeners[o](a);i._listeners=null}}),this.promise.then=function(a){var o,s=new Promise(function(u){i.subscribe(u),o=u}).then(a);return s.cancel=function(){i.unsubscribe(o)},s},r(function(o,s,u){i.reason||(i.reason=new t(o,s,u),n(i.reason))})}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.prototype.subscribe=function(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]},e.prototype.unsubscribe=function(n){if(this._listeners){var i=this._listeners.indexOf(n);i!==-1&&this._listeners.splice(i,1)}},e.source=function(){var n,i=new e(function(o){n=o});return{token:i,cancel:n}},Lg=e,Lg}var Dg,zC;function MK(){return zC||(zC=1,Dg=function(e){return function(n){return e.apply(null,n)}}),Dg}var Bg,WC;function FK(){if(WC)return Bg;WC=1;var t=_r;return Bg=function(r){return t.isObject(r)&&r.isAxiosError===!0},Bg}var e_=_r,NK=Jk,hd=IK,LK=mM,DK=Wb,BK=dM;function _M(t){var e=new hd(t),r=NK(hd.prototype.request,e);return e_.extend(r,hd.prototype,e),e_.extend(r,e),r.create=function(i){return _M(LK(t,i))},r}var vn=_M(DK);vn.Axios=hd;vn.CanceledError=gv();vn.CancelToken=kK();vn.isCancel=vM();vn.VERSION=gM().version;vn.toFormData=mv;vn.AxiosError=ks;vn.Cancel=vn.CanceledError;vn.all=function(e){return Promise.all(e)};vn.spread=MK();vn.isAxiosError=FK();vn.formToJSON=function(t){return BK(e_.isHTMLForm(t)?new FormData(t):t)};Ub.exports=vn;Ub.exports.default=vn;var jK=Ub.exports,UK=jK;const Wc=gn(UK),ua=t=>new Promise((e,r)=>{Wc.get(t).then(n=>{const i=n.data.toString();e(i)}).catch(n=>{r(n)})});var $K="__lodash_hash_undefined__";function VK(t){return this.__data__.set(t,$K),this}var GK=VK;function XK(t){return this.__data__.has(t)}var zK=XK,WK=bb,YK=GK,HK=zK;function op(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new WK;++e-1}var lZ=sZ;function uZ(t,e,r){for(var n=-1,i=t==null?0:t.length;++n=AZ){var l=e?null:EZ(t);if(l)return TZ(l);o=!1,i=wZ,u=new xZ}else u=e?[]:s;e:for(;++n{for(const e of t)L.sceneManager.settledScenes.includes(e)?ge.warn(`场景${e}已经加载过,无需再次加载`):(ge.info(`现在预加载场景${e}`),ua(e).then(r=>{ca(r,e,e)}))},kZ=(t,e)=>{L.sceneManager.lockSceneWrite||(L.sceneManager.lockSceneWrite=!0,L.sceneManager.sceneData.sceneStack.push({sceneName:L.sceneManager.sceneData.currentScene.sceneName,sceneUrl:L.sceneManager.sceneData.currentScene.sceneUrl,continueLine:L.sceneManager.sceneData.currentSentenceId}),ua(t).then(r=>{L.sceneManager.sceneData.currentScene=ca(r,e,t),L.sceneManager.sceneData.currentSentenceId=0;const n=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(t);const i=jf(n);Uf(i),ge.debug("现在调用场景,调用结果:",L.sceneManager.sceneData),L.sceneManager.lockSceneWrite=!1,tn()}).catch(r=>{ge.error("场景调用错误",r),L.sceneManager.lockSceneWrite=!1}))},MZ=t=>{const e=t.content.split("/"),r=e[e.length-1];return kZ(t.content,r),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Yc(t,e,r){let n;const a=te.getState().stage.effects.find(o=>o.target===t);if(e.duration=500,r&&typeof r=="number"&&(e.duration=r),n=[e],a){const o={...a.transform,duration:0};n.unshift(o)}else{const o={...e,alpha:0,duration:0};n.unshift(o)}return n}function SM(t,e){const r=L.gameplay.pixiStage.getStageObjByKey(t);function n(){r&&(r.pixiContainer.alphaFilterVal=0)}function i(){r&&(r.pixiContainer.alphaFilterVal=1)}function a(o){if(r){const s=r.pixiContainer,u=L.gameplay.pixiStage.frameDuration,c=1/(e/u*o);s.alphaFilterVal<1&&(s.alpha+=c)}}return{setStartState:n,setEndState:i,tickerFunc:a}}function wM(t,e){const r=L.gameplay.pixiStage.getStageObjByKey(t);function n(){}function i(){r&&(r.pixiContainer.alphaFilterVal=0)}function a(o){if(r){const s=r.pixiContainer,u=L.gameplay.pixiStage.frameDuration,c=1/(e/u*o);s.alphaFilterVal>0&&(s.alphaFilterVal-=c)}}return{setStartState:n,setEndState:i,tickerFunc:a}}const Kb={alpha:1,scale:{x:1,y:1},position:{x:0,y:0},rotation:0,blur:0};function EM(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);iMath.min(Math.max(r,t),e),Ug=.001,NZ=.01,HC=10,LZ=.05,DZ=1;function BZ({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,a;FZ(t<=HC*1e3);let o=1-e;o=t_(LZ,DZ,o),t=t_(NZ,HC,t/1e3),o<1?(i=l=>{const c=l*o,f=c*t,h=c-r,d=r_(l,o),p=Math.exp(-f);return Ug-h/d*p},a=l=>{const f=l*o*t,h=f*r+r,d=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-f),v=r_(Math.pow(l,2),o);return(-i(l)+Ug>0?-1:1)*((h-d)*p)/v}):(i=l=>{const c=Math.exp(-l*t),f=(l-r)*t+1;return-Ug+c*f},a=l=>{const c=Math.exp(-l*t),f=(r-l)*(t*t);return c*f});const s=5/t,u=UZ(i,a,s);if(t=t*1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(u,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const jZ=12;function UZ(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function GZ(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!qC(t,VZ)&&qC(t,$Z)){const r=BZ(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Zb(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:i}=t,a=EM(t,["from","to","restSpeed","restDelta"]);const o={done:!1,value:e};let{stiffness:s,damping:u,mass:l,velocity:c,duration:f,isResolvedFromDuration:h}=GZ(a),d=KC,p=KC;function v(){const g=c?-(c/1e3):0,m=r-e,y=u/(2*Math.sqrt(s*l)),_=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-e)/100,.4)),y<1){const x=r_(_,y);d=b=>{const S=Math.exp(-y*_*b);return r-S*((g+y*_*m)/x*Math.sin(x*b)+m*Math.cos(x*b))},p=b=>{const S=Math.exp(-y*_*b);return y*_*S*(Math.sin(x*b)*(g+y*_*m)/x+m*Math.cos(x*b))-S*(Math.cos(x*b)*(g+y*_*m)-x*m*Math.sin(x*b))}}else if(y===1)d=x=>r-Math.exp(-_*x)*(m+(g+_*m)*x);else{const x=_*Math.sqrt(y*y-1);d=b=>{const S=Math.exp(-y*_*b),w=Math.min(x*b,300);return r-S*((g+y*_*m)*Math.sinh(w)+x*m*Math.cosh(w))/x}}}return v(),{next:g=>{const m=d(g);if(h)o.done=g>=f;else{const y=p(g)*1e3,_=Math.abs(y)<=n,x=Math.abs(r-m)<=i;o.done=_&&x}return o.value=o.done?r:m,o},flipTarget:()=>{c=-c,[e,r]=[r,e],v()}}}Zb.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const KC=t=>0,TM=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},Qb=(t,e,r)=>-r*t+r*e+t,AM=(t,e)=>r=>Math.max(Math.min(r,e),t),bc=t=>t%1?Number(t.toFixed(5)):t,sp=/(-)?([\d]*\.?[\d])+/g,n_=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,XZ=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function $f(t){return typeof t=="string"}const xv={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},CM=Object.assign(Object.assign({},xv),{transform:AM(0,1)});Object.assign(Object.assign({},xv),{default:1});const zZ=t=>({test:e=>$f(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Sc=zZ("%");Object.assign(Object.assign({},Sc),{parse:t=>Sc.parse(t)/100,transform:t=>Sc.transform(t*100)});const Jb=(t,e)=>r=>!!($f(r)&&XZ.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),PM=(t,e,r)=>n=>{if(!$f(n))return n;const[i,a,o,s]=n.match(sp);return{[t]:parseFloat(i),[e]:parseFloat(a),[r]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},es={test:Jb("hsl","hue"),parse:PM("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Sc.transform(bc(e))+", "+Sc.transform(bc(r))+", "+bc(CM.transform(n))+")"},WZ=AM(0,255),$g=Object.assign(Object.assign({},xv),{transform:t=>Math.round(WZ(t))}),eo={test:Jb("rgb","red"),parse:PM("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+$g.transform(t)+", "+$g.transform(e)+", "+$g.transform(r)+", "+bc(CM.transform(n))+")"};function YZ(t){let e="",r="",n="",i="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),i=t.substr(4,1),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const i_={test:Jb("#"),parse:YZ,transform:eo.transform},bv={test:t=>eo.test(t)||i_.test(t)||es.test(t),parse:t=>eo.test(t)?eo.parse(t):es.test(t)?es.parse(t):i_.parse(t),transform:t=>$f(t)?t:t.hasOwnProperty("red")?eo.transform(t):es.transform(t)},OM="${c}",RM="${n}";function HZ(t){var e,r,n,i;return isNaN(t)&&$f(t)&&((r=(e=t.match(sp))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((i=(n=t.match(n_))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function IM(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0;const n=t.match(n_);n&&(r=n.length,t=t.replace(n_,OM),e.push(...n.map(bv.parse)));const i=t.match(sp);return i&&(t=t.replace(sp,RM),e.push(...i.map(xv.parse))),{values:e,numColors:r,tokenised:t}}function kM(t){return IM(t).values}function MM(t){const{values:e,numColors:r,tokenised:n}=IM(t),i=e.length;return a=>{let o=n;for(let s=0;stypeof t=="number"?0:t;function KZ(t){const e=kM(t);return MM(t)(e.map(qZ))}const FM={test:HZ,parse:kM,createTransformer:MM,getAnimatableNone:KZ};function Vg(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function ZC({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,a=0,o=0;if(!e)i=a=o=r;else{const s=r<.5?r*(1+e):r+e-r*e,u=2*r-s;i=Vg(u,s,t+1/3),a=Vg(u,s,t),o=Vg(u,s,t-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}const ZZ=(t,e,r)=>{const n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},QZ=[i_,eo,es],QC=t=>QZ.find(e=>e.test(t)),NM=(t,e)=>{let r=QC(t),n=QC(e),i=r.parse(t),a=n.parse(e);r===es&&(i=ZC(i),r=eo),n===es&&(a=ZC(a),n=eo);const o=Object.assign({},i);return s=>{for(const u in o)u!=="alpha"&&(o[u]=ZZ(i[u],a[u],s));return o.alpha=Qb(i.alpha,a.alpha,s),r.transform(o)}},JZ=t=>typeof t=="number",eQ=(t,e)=>r=>e(t(r)),LM=(...t)=>t.reduce(eQ);function DM(t,e){return JZ(t)?r=>Qb(t,e,r):bv.test(t)?NM(t,e):jM(t,e)}const BM=(t,e)=>{const r=[...t],n=r.length,i=t.map((a,o)=>DM(a,e[o]));return a=>{for(let o=0;o{const r=Object.assign(Object.assign({},t),e),n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=DM(t[i],e[i]));return i=>{for(const a in n)r[a]=n[a](i);return r}};function JC(t){const e=FM.parse(t),r=e.length;let n=0,i=0,a=0;for(let o=0;o{const r=FM.createTransformer(e),n=JC(t),i=JC(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?LM(BM(n.parsed,i.parsed),r):o=>`${o>0?e:t}`},rQ=(t,e)=>r=>Qb(t,e,r);function nQ(t){if(typeof t=="number")return rQ;if(typeof t=="string")return bv.test(t)?NM:jM;if(Array.isArray(t))return BM;if(typeof t=="object")return tQ}function iQ(t,e,r){const n=[],i=r||nQ(t[0]),a=t.length-1;for(let o=0;or(TM(t,e,n))}function oQ(t,e){const r=t.length,n=r-1;return i=>{let a=0,o=!1;if(i<=t[0]?o=!0:i>=t[n]&&(a=n-1,o=!0),!o){let u=1;for(;ui||u===n);u++);a=u-1}const s=TM(t[a],t[a+1],i);return e[a](s)}}function UM(t,e,{clamp:r=!0,ease:n,mixer:i}={}){const a=t.length;YC(a===e.length),YC(!n||!Array.isArray(n)||n.length===a-1),t[0]>t[a-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const o=iQ(e,n,i),s=a===2?aQ(t,o):oQ(t,o);return r?u=>s(t_(t[0],t[a-1],u)):s}const sQ=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,lQ=t=>e=>Math.pow(e,t),uQ=t=>e=>e*e*((t+1)*e-t),cQ=t=>{const e=uQ(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))},fQ=1.525,hQ=lQ(2),dQ=sQ(hQ);cQ(fQ);function pQ(t,e){return t.map(()=>e||dQ).splice(0,t.length-1)}function vQ(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function mQ(t,e){return t.map(r=>r*e)}function dd({from:t=0,to:e=1,ease:r,offset:n,duration:i=300}){const a={done:!1,value:t},o=Array.isArray(e)?e:[t,e],s=mQ(n&&n.length===o.length?n:vQ(o),i);function u(){return UM(s,o,{ease:Array.isArray(r)?r:pQ(o,r)})}let l=u();return{next:c=>(a.value=l(c),a.done=c>=i,a),flipTarget:()=>{o.reverse(),l=u()}}}function gQ({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:a}){const o={done:!1,value:e};let s=r*t;const u=e+s,l=a===void 0?u:a(u);return l!==u&&(s=l-e),{next:c=>{const f=-s*Math.exp(-c/n);return o.done=!(f>i||f<-i),o.value=o.done?l:l+f,o},flipTarget:()=>{}}}const eP={keyframes:dd,spring:Zb,decay:gQ};function yQ(t){if(Array.isArray(t.to))return dd;if(eP[t.type])return eP[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?dd:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Zb:dd}const $M=1/60*1e3,_Q=typeof performance<"u"?()=>performance.now():()=>Date.now(),VM=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(_Q()),$M);function xQ(t){let e=[],r=[],n=0,i=!1,a=!1;const o=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const f=c&&i,h=f?e:r;return l&&o.add(u),h.indexOf(u)===-1&&(h.push(u),f&&i&&(n=e.length)),u},cancel:u=>{const l=r.indexOf(u);l!==-1&&r.splice(l,1),o.delete(u)},process:u=>{if(i){a=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let l=0;l(t[e]=xQ(()=>Hc=!0),t),{}),SQ=Vf.reduce((t,e)=>{const r=Sv[e];return t[e]=(n,i=!1,a=!1)=>(Hc||TQ(),r.schedule(n,i,a)),t},{}),wQ=Vf.reduce((t,e)=>(t[e]=Sv[e].cancel,t),{});Vf.reduce((t,e)=>(t[e]=()=>Sv[e].process(wc),t),{});const EQ=t=>Sv[t].process(wc),GM=t=>{Hc=!1,wc.delta=a_?$M:Math.max(Math.min(t-wc.timestamp,bQ),1),wc.timestamp=t,o_=!0,Vf.forEach(EQ),o_=!1,Hc&&(a_=!1,VM(GM))},TQ=()=>{Hc=!0,a_=!0,o_||VM(GM)},AQ=SQ;function XM(t,e,r=0){return t-e-r}function CQ(t,e,r=0,n=!0){return n?XM(e+-t,e,r):e-(t-e)+r}function PQ(t,e,r,n){return n?t>=e+r:t<=-r}const OQ=t=>{const e=({delta:r})=>t(r);return{start:()=>AQ.update(e,!0),stop:()=>wQ.update(e)}};function RQ(t){var e,r,{from:n,autoplay:i=!0,driver:a=OQ,elapsed:o=0,repeat:s=0,repeatType:u="loop",repeatDelay:l=0,onPlay:c,onStop:f,onComplete:h,onRepeat:d,onUpdate:p}=t,v=EM(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=v,m,y=0,_=v.duration,x,b=!1,S=!0,w;const E=yQ(v);!((r=(e=E).needsInterpolation)===null||r===void 0)&&r.call(e,n,g)&&(w=UM([0,100],[n,g],{clamp:!1}),n=0,g=100);const T=E(Object.assign(Object.assign({},v),{from:n,to:g}));function A(){y++,u==="reverse"?(S=y%2===0,o=CQ(o,_,l,S)):(o=XM(o,_,l),u==="mirror"&&T.flipTarget()),b=!1,d&&d()}function O(){m.stop(),h&&h()}function P(M){if(S||(M=-M),o+=M,!b){const B=T.next(Math.max(0,o));x=B.value,w&&(x=w(x)),b=S?B.done:o<=0}p==null||p(x),b&&(y===0&&(_??(_=o)),y{f==null||f(),m.stop()}}}function IQ(t,e){for(var r=-1,n=t==null?0:t.length;++rs))return!1;var l=a.get(t),c=a.get(e);if(l&&c)return l==e&&c==t;var f=-1,h=!0,d=r&DQ?new MQ:void 0;for(a.set(t,e),a.set(e,t);++f0&&(u=RQ({to:a,offset:o,duration:r,onUpdate:m=>{if(s){const{scaleX:y,scaleY:_,...x}=m;Object.assign(s,zg(x,ga)),ga(y)||(s.scale.x=y),ga(_)||(s.scale.y=_)}}}));const{duration:l,...c}=v();te.dispatch(Tr.updateEffect({target:e,transform:c}));function f(){if(n!=null&&n.pixiContainer){const{position:m,scale:y,..._}=p(),x=zg({x:m.x,y:m.y,..._},ga);Object.assign(n==null?void 0:n.pixiContainer,x),n!=null&&n.pixiContainer&&(ga(y.x)||(n.pixiContainer.scale.x=y.x),ga(y==null?void 0:y.y)||(n.pixiContainer.scale.y=y.y))}}function h(){if(u&&u.stop(),u=null,n!=null&&n.pixiContainer){const{position:m,scale:y,..._}=v(),x=zg({x:m.x,y:m.y,..._},ga);Object.assign(n==null?void 0:n.pixiContainer,x),n!=null&&n.pixiContainer&&(ga(y.x)||(n.pixiContainer.scale.x=y.x),ga(y==null?void 0:y.y)||(n.pixiContainer.scale.y=y.y))}}function d(m){}function p(){return t[0]}function v(){return t[t.length-1]}function g(){const m=t[t.length-1],{alpha:y,rotation:_,blur:x,duration:b,scale:S,position:w,...E}=m;return E}return{setStartState:f,setEndState:h,tickerFunc:d,getEndFilterEffect:g}}function lp(t,e,r){const n=L.animationManager.getAnimations().find(i=>i.name===t);if(n){const i=n.effects.map(a=>{const o=te.getState().stage.effects.find(u=>u.target===e),s=Jt({...(o==null?void 0:o.transform)??Kb,duration:0});return Object.assign(s,a),s.duration=a.duration,s});return ge.debug("装载自定义动画",i),tF(i,e,r)}return null}function En(t){const e=L.animationManager.getAnimations().find(r=>r.name===t);if(e){let r=0;return e.effects.forEach(n=>{r+=n.duration}),r}return 0}function Ka(t,e,r=!1,n){if(e==="enter"){let i=500;r&&(i=1500);let a=SM(n??t,i);const o=L.animationManager.nextEnterAnimationName.get(t);return o&&(ge.debug("取代默认进入动画",t),a=lp(o,n??t,En(o)),i=En(o),L.animationManager.nextEnterAnimationName.delete(t)),{duration:i,animation:a}}else{let i=750;r&&(i=1500);let a=wM(n??t,i);const o=L.animationManager.nextExitAnimationName.get(t);return o&&(ge.debug("取代默认退出动画",t),a=lp(o,n??t,En(o)),i=En(o),L.animationManager.nextExitAnimationName.delete(t)),{duration:i,animation:a}}}const Xte=t=>{const e=t.content;let r="",n="default";t.args.forEach(l=>{l.key==="unlockname"&&(r=l.value.toString()),l.key==="series"&&(n=l.value.toString())});const i=te.dispatch;r!==""&&i(zk({name:r,url:e,series:n})),i(Tr.removeEffectByTargetId("bg-main"));const a=He(t,"transform");let o=He(t,"duration");(!o||typeof o!="number")&&(o=1e3);let s;if(a)try{const l=JSON.parse(a.toString());s=Yc("bg-main",l,o),s[0].alpha=0;const c=(Math.random()*10).toString(16),f={name:c,effects:s};L.animationManager.addAnimation(f),o=En(c),L.animationManager.nextEnterAnimationName.set("bg-main",c)}catch{u()}else u();function u(){s=Yc("bg-main",{},o),s[0].alpha=0;const c=(Math.random()*10).toString(16),f={name:c,effects:s};L.animationManager.addAnimation(f),o=En(c),L.animationManager.nextEnterAnimationName.set("bg-main",c)}return He(t,"enter")&&(L.animationManager.nextEnterAnimationName.set("bg-main",He(t,"enter").toString()),o=En(He(t,"enter").toString())),He(t,"exit")&&(L.animationManager.nextExitAnimationName.set("bg-main-off",He(t,"exit").toString()),o=En(He(t,"exit").toString())),i(Ge({key:"bgName",value:t.content})),{performName:"none",duration:o,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function zte(t){let e="center",r=t.content,n=!1,i="",a="",o="",s=500,u="",l="",c="",f="",h="",d="",p="",v=-1;const g=te.dispatch;for(const w of t.args)switch(w.key){case"left":w.value===!0&&(e="left");break;case"right":w.value===!0&&(e="right");break;case"clear":w.value===!0&&(r="");break;case"id":n=!0,o=w.value.toString();break;case"motion":i=w.value.toString();break;case"bounds":p=String(w.value);break;case"expression":a=w.value.toString();break;case"mouthOpen":u=w.value.toString(),u=Nn(u,Fn.figure);break;case"mouthClose":l=w.value.toString(),l=Nn(l,Fn.figure);break;case"mouthHalfOpen":c=w.value.toString(),c=Nn(c,Fn.figure);break;case"eyesOpen":f=w.value.toString(),f=Nn(f,Fn.figure);break;case"eyesClose":h=w.value.toString(),h=Nn(h,Fn.figure);break;case"animationFlag":d=w.value.toString();break;case"none":r="";break;case"zIndex":v=Number(w.value);break}const m=o||`fig-${e}`,_=te.getState().stage.figureAssociatedAnimation.filter(w=>w.targetId!==m),x={targetId:m,animationFlag:d,mouthAnimation:{open:u,close:l,halfOpen:c},blinkAnimation:{open:f,close:h}};_.push(x),g(Ge({key:"figureAssociatedAnimation",value:_}));let b=!0;if(o!==""){const w=te.getState().stage.freeFigure.find(E=>E.key===o);w&&w.name===t.content&&(b=!1)}else e==="center"&&te.getState().stage.figName===t.content&&(b=!1),e==="left"&&te.getState().stage.figNameLeft===t.content&&(b=!1),e==="right"&&te.getState().stage.figNameRight===t.content&&(b=!1);if(b){const w=`fig-${e}`,E=`${o}`;te.dispatch(Tr.removeEffectByTargetId(w)),te.dispatch(Tr.removeEffectByTargetId(E)),g(Tr.setFigureMetaData([w,"zIndex",0,!0])),g(Tr.setFigureMetaData([E,"zIndex",0,!0]))}const S=(w,E)=>{const T=He(E,"transform"),A=He(E,"duration");A&&typeof A=="number"&&(s=A);let O;if(T){console.log(T);try{const B=JSON.parse(T.toString());O=Yc(w,B,s),O[0].alpha=0;const j=(Math.random()*10).toString(16),z={name:j,effects:O};L.animationManager.addAnimation(z),s=En(j),L.animationManager.nextEnterAnimationName.set(w,j)}catch{P()}}else P();function P(){O=Yc(w,{},s),O[0].alpha=0;const j=(Math.random()*10).toString(16),z={name:j,effects:O};L.animationManager.addAnimation(z),s=En(j),L.animationManager.nextEnterAnimationName.set(w,j)}const k=He(E,"enter"),M=He(E,"exit");k&&(L.animationManager.nextEnterAnimationName.set(w,k.toString()),s=En(k.toString())),M&&(L.animationManager.nextExitAnimationName.set(w+"-off",M.toString()),s=En(M.toString()))};if(n){const w={key:o,name:r,basePosition:e};S(o,t),(i||p)&&g(Tr.setLive2dMotion({target:o,motion:i,overrideBounds:mP(p)})),a&&g(Tr.setLive2dExpression({target:o,expression:a})),v>0&&g(Tr.setFigureMetaData([o,"zIndex",v,!1])),g(Tr.setFreeFigureByKey(w))}else{const w={center:"fig-center",left:"fig-left",right:"fig-right"},E={center:"figName",left:"figNameLeft",right:"figNameRight"};o=w[e],S(o,t),(i||p)&&g(Tr.setLive2dMotion({target:o,motion:i,overrideBounds:mP(p)})),a&&g(Tr.setLive2dExpression({target:o,expression:a})),v>0&&g(Tr.setFigureMetaData([o,"zIndex",v,!1])),g(Ge({key:E[e],value:r}))}return{performName:"none",duration:s,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}}function mP(t){const e=t.split(",").map(n=>Number(n));let r=!0;if(e.forEach(n=>{isNaN(n)&&(r=!1)}),r=r&&e.length===4,r)return e}const rF=(t,e)=>{L.sceneManager.lockSceneWrite||(L.sceneManager.lockSceneWrite=!0,ua(t).then(r=>{L.sceneManager.sceneData.currentScene=ca(r,e,t),L.sceneManager.sceneData.currentSentenceId=0;const n=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(t);const i=jf(n);Uf(i),ge.debug("现在切换场景,切换后的结果:",L.sceneManager.sceneData),L.sceneManager.lockSceneWrite=!1,tn()}).catch(r=>{ge.error("场景调用错误",r),L.sceneManager.lockSceneWrite=!1}))},Wte=t=>{const e=t.content.split("/"),r=e[e.length-1];return rF(t.content,r),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},nF=t=>{const e=L.sceneManager.sceneData.currentSentenceId;let r=e;L.sceneManager.sceneData.currentScene.sentenceList.forEach((n,i)=>{n.command===Qe.label&&n.content===t&&i!==e&&(r=i)}),L.sceneManager.sceneData.currentSentenceId=r,setTimeout(tn,1)},Yte="_Choose_Main_1kza1_1",Hte="_Choose_item_1kza1_13",qte="_Choose_item_disabled_1kza1_34",Kte="_Choose_item_outer_1kza1_50",gh={Choose_Main:Yte,Choose_item:Hte,Choose_item_disabled:qte,Choose_item_outer:Kte},Zte=""+new URL("page-flip-1-7df32409.mp3",import.meta.url).href,Qte=""+new URL("switch-1-99b576bc.mp3",import.meta.url).href,iF="data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU3LjE0LjEwMAAAAAAAAAAAAAAA//OAAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAHAAAGhgA/Pz8/Pz8/Pz8/Pz8/P19fX19fX19fX19fX19ff39/f39/f39/f39/f3+fn5+fn5+fn5+fn5+fn5+/v7+/v7+/v7+/v7+/v9/f39/f39/f39/f39/f//////////////////8AAAAATGF2YzU3LjE1AAAAAAAAAAAAAAAAJAAAAAAAAAAABoYV32R7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/zgGQAAAABpAAAAAAAAANIAAAAACADH/+QtN3NAAAKF6IiVEl7hE0Sv/+XsgGgCgQDQFAgGg3D+yBShQzd+K0qXyBQyRQUp3hEkUMGn/8oCBQ5KOIf+sPl3//+Xf/+GP//6w+EgFgk/nOfWhA4Q4ABxjnQhDhCD3pgIQLAARlkyZ8Ew+Ud1AgUOfy7/4OeGOUORPD//wwUd/KHP//+GPykMA445BCHBIYg4ZC4AyGP+PuWtgyRb6quwuJvp+v8wQwDAKoXYMnpC0w6gAc0HLf/84JkuwnkuN6ioaAAD3CpsVVFMAAFQBkWjRnE4hYMOnIaT5sXEGFHCyMLPhfcDTHTUmRcgnQMuCfCKHjcDRlTchxFTcEHsKGiBNQ6mLhLkNImWi8PkY6s3kUWgaJmjd1igSfFzk+gLLIOcMi4gXyupR9A20G/4zAhOJ/PDgGYKI4y4LMEEBYhnUz1lpozrmZk3//lsky4s+TB4ul8ny6YOV0FmRx0ElHlMbNWYOr///1uZFQ3IGRNBRmfWlRUYkeV8mVhC5j/+UOiwF4DdcGgB//zgmTqHCnhQS/NUAGcStp6X4JQAARBgQCDIwGbMjrzxBIRk8s4+IS7mMEYN4elXLheFicbuxm88zzzHaw/G//9DCJ+eYRf8WGFtZp9ydCUvPMKGf/57ZjPRjzHtq+3//+YZ2U8817jxbb1vcn/1yAPkAgGUJuPiliw1FHilYbAAkIkV4CdGauxnChrTd+JTOW4BTlAB55YoeqaxWm7Wv8xLqLOiiZLUixqapJF5JNAcoviEoN2gAwAUcLiN5Mk6i3TRU+ikk++6KKKTqSKyBsx//OCZFMVigU/GuzMAIuQEq5fwxACNMZGRPKvoqXbR0UbJP11I0t9J/SqSrRZ0lXoqetSTnWoto0kl26LJGJqizoJmtJSSNSWk7WdTpXUkiigbVor9K6lpKSrdFNi8gnstA65dQVWxkXlGyTGRiRt9gUkBwgAggllBkQbKigffEMUfzqlL+6Ruli5Bv+4lPf//////X/////o0Wte9XLYBs4JbHGkwql7GrPNPMusqAJDUPzthoURwGi5eZyu+VuecNrURSYBU/p8//81Vf+Znkn/84JkNA4gwTcvDYYmF1lmTbAzByQpycp3ROJPn025p4SQJoSeFQoViUUAoiJFRL3c8JRUNETudLFn0MtLDwrM4lUeOiJtiztbvBk6xyPrctYdEkBpA09q2Xn9/TmkZxYMuXBUW17I4clP/nKrXbW/C6FI5G0z11z31L9fvGqoAzY1X86WwYUHIdWCvLEwkeEq3kQ7iI8MPM/ssO/8OnlHsFW1nWeCvyzwVOtEvHuyqv/8hOYSETL//NtNaySXOSsAqIiRrkS82UvXUvppbobMbv/zgmQhC0HzBAAEwpKVEO4JYAjTIJ/y/0egY3vXWaZv65cpZm36G/mMUpdalcpStzalb1KXUoUBf8pXKyGM5Sv/TRRPKoUSQMYKTJfSwiUDeW+ZhhmIXNYfiyfSbiqFFLNEQaajFVnrO9YLTodKvET9Z0FcSgq6s6eIz3uLcFQmCxJY06W/g0Cri31AqGrq56EgaXxLPCUNdBZ5USrBUse3BqpNF93yP//yMyMDWEJGQ01////MjMv//I1kcjJrLf/stlzL55SkyyOX5q0cjVrL//OCZC4KtfrOGgAjbodYBawMAEQAYf//+Rk1qGRqygo5GRq1sP/sln//cyNWCg0cj//ZZZZKh+asCHP8lAL////9n/////////GMYm3raaWKige/+sW+LesVTEFNRTMuOTkuNaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo=",Jte=""+new URL("dialog-d5b91235.mp3",import.meta.url).href,aF="data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjIzLjEwMQAAAAAAAAAAAAAA//OAAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAHAAAGhgA/Pz8/Pz8/Pz8/Pz8/P19fX19fX19fX19fX19ff39/f39/f39/f39/f3+fn5+fn5+fn5+fn5+fn5+/v7+/v7+/v7+/v7+/v9/f39/f39/f39/f39/f//////////////////8AAAAATGF2YzU4LjQwAAAAAAAAAAAAAAAAJAL7AAAAAAAABobgvJxkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/zgGQADLH/PRigiACM0AZ+XUAQAoAVYA9AY3IAASAgeRjeQMhP0O/nec/1cn+Qnv/8n+RuhGUhPoQDPISc6HP1Oec7+pwAROeQikI3IT////z+p3Q56VOd/nOc5JzyAAhQAAI053QDFnoQjKACGvoQ7yThzoBgZ8ADMJQURtuNAkMH4P4P+XOZD4f5d/D/64f/3co7/8H8u/wQ5R3/+sPiN8TvB95SDgYT/yjgQf+mpbd5dJrdLkpewIOA5GsDQUQZnZzSB6Q1U50Guqy9OaH/84JkIg/hbXkux6gBEfpLBx+SKAZQvxWLwbxAAoJRbMJjWBoPcgIzjpzzz2clFsxj0ITlVELLXdjzyg8Q3UoM0PPct+QCw/6D5KMrNmLdXOUnPRjXJ3nMYVFVfnfdzf//q//MR+Q/8uwB0uyB/lVHlY6YhEIGR4cHYHAcAZwSQAJAcAocdAxoAMh6L1HV969TxECi7iHlYn7jW//an//+JXU5/9v4l//6EM3f83/41j3///+ozd63/9C2p2W2W22i0Mq2OVytAvxB06nWCVQIZP/zgmQXD4W5ey/HqAEQUkbOR4koAmYRklcoUe+Yd1AuC8AHmsVSoIxFCwPh6RI8ajdB8807yw/JxoLbsai/djzjScCv+Q/lARCSFyRC8hIFYZkF06Dv//MLs5zV+edqzv6krdvP9V/yO3p66H//n73UnMetFzzx4P/MNxBOVut0AFwIAARCgysYSXL+VO2TXhMWBADVCKKhQmjLmX/////0/P+rf7f///29++FO9LfYWYp//Z9n/yHlg30VsPil34MMSQVrYqfLAYVacpCtK1Oq//OCZBUPGaFC3+e0AA8ZVoZdyxAA2az68kOa28sO3puYoqNkUTUxnD6CKnSNlGTJJositaK2TdJSb2NWSX/SSScyDlAnQ6myTv/1X0aJePGZqjnT1FL6v9SRkXW/dVaKP6VaKLOv//+r//X/ZzF06dSFLuv/1B0aZUKwhImgCMAB2aHaUe7x55QPP/rp3zyZZf/VkdS3RFZ3m/9H//iSCn/1Qaev/0CVH3+oO1P///1t+j//9KoPL7QDcAaC4x+83dEEEvXL3vljkRVf5ZqiVpT/84JkGw5BSSx+MMpOEjoual7AxBzqOG5mzBJL6c7URxGtROS/Zu8vMwc2/naKcgTgLi5R79f/ZSUVjWOSaa1aHK5xM/apQnJHJUuTbXQ5VN09HRzSUNfirDtAVBYCwdfpJmYrjDVue/9pJZFMiSvSUMuMAg40uvlBXQECFUh3VKcOGoUBJAurXLsY3+xpv///1aZAwAP///yghpkdW/5qt8OMEMKKg7/pDn///h1/Ues6P/xLEaAkoyibeSeC8E+AuhymiEos8tLHJNRoThxKnP/zgmQcDD0TFAk8xToRuh4sCGgPKooy1Y8s/q2X/ZH//6tqJAEEQwRKxjI9y1KWWqPDw8awiKqQPPob/pRUDwAioCEtX9R7/9eGlncrLPLBVgKmRZ+GpD/tqEogdIXwLlNkUnUxiamSS0W/ooqUlrot//zUCIHRc05Zrqaabod86PDZv/+b/UamAIGjTP+W/879s9liLSrmCVxXgq7xL+RKoQZ+UAAwBYQh4Rig2ZaVmytcNUuiO5/zP8jP1/+VMy/1RygyCgEMDDLv4CCZF3/S//OCZC8JaK7qfiQiTgxILdAAYYYEEhVLrP///S1HoCosaCoCCYZrZUSBkQDwESH/WkJSAZjByJI0oE4Z/////4FCQeBkVZ/xX/zIsRd/6hf7X//4qSfqwEEiLv1ciEyISQKqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo=";var oF={exports:{}},sF={};/** +`;return[e,r.trim()]}class o7{constructor(e,r,n,i){Ae(this,"assetsPrefetcher");Ae(this,"assetSetter");Ae(this,"ADD_NEXT_ARG_LIST");Ae(this,"SCRIPT_CONFIG_MAP");this.assetsPrefetcher=e,this.assetSetter=r,this.ADD_NEXT_ARG_LIST=n,Array.isArray(i)?(this.SCRIPT_CONFIG_MAP=new Map,i.forEach(a=>{this.SCRIPT_CONFIG_MAP.set(a.scriptString,a)})):this.SCRIPT_CONFIG_MAP=i}parse(e,r,n){return n7(e,r,n,this.assetsPrefetcher,this.assetSetter,this.ADD_NEXT_ARG_LIST,this.SCRIPT_CONFIG_MAP)}parseConfig(e){return xW(e)}stringifyConfig(e){return e.reduce((r,n)=>r+`${n.command}:${n.args.join("|")}${n.options.length<=0?"":n.options.reduce((i,a)=>i+" -"+a.key+"="+a.value,"")}; +`,"")}parseScssToWebgalStyleObj(e){return i7(e)}}function He(t,e){const n=t.args.find(i=>i.key===e);return n?n.value:null}const s7=t=>{let e=t.content,r="",n="default";t.args.forEach(o=>{o.key==="unlockname"&&(r=o.value.toString()),o.key==="series"&&(n=o.value.toString())});const i=He(t,"enter"),a=He(t,"volume");return r!==""&&te.dispatch(Yk({name:r,url:e,series:n})),CS(e,typeof i=="number"&&i>=0?i:0,typeof a=="number"&&a>=0&&a<=100?a:100),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};var $b={exports:{}},eM=function(e,r){return function(){return e.apply(r,arguments)}},l7=eM,Vb=Object.prototype.toString,Gb=function(t){return function(e){var r=Vb.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function Io(t){return t=t.toLowerCase(),function(r){return Gb(r)===t}}function vv(t){return Array.isArray(t)}function Q0(t){return typeof t>"u"}function u7(t){return t!==null&&!Q0(t)&&t.constructor!==null&&!Q0(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}var tM=Io("ArrayBuffer");function c7(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&tM(t.buffer),e}function f7(t){return typeof t=="string"}function rM(t){return typeof t=="number"}function nM(t){return t!==null&&typeof t=="object"}function fd(t){if(Gb(t)!=="object")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function h7(t){return t&&Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}var d7=Io("Date"),p7=Io("File"),v7=Io("Blob"),m7=Io("FileList");function Xb(t){return Vb.call(t)==="[object Function]"}function g7(t){return nM(t)&&Xb(t.pipe)}function y7(t){var e="[object FormData]";return t&&(typeof FormData=="function"&&t instanceof FormData||Vb.call(t)===e||Xb(t.toString)&&t.toString()===e)}var _7=Io("URLSearchParams");function x7(t){return t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function b7(){var t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"}function zb(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),vv(t))for(var r=0,n=t.length;r0;)o=i[a],(!n||n(o,t,e))&&!s[o]&&(e[o]=t[o],s[o]=!0);t=r!==!1&&Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e}function A7(t,e,r){t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;var n=t.indexOf(e,r);return n!==-1&&n===r}function C7(t){if(!t)return null;if(vv(t))return t;var e=t.length;if(!rM(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r}var P7=function(t){return function(e){return t&&e instanceof t}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));function O7(t,e){for(var r=t&&t[Symbol.iterator],n=r.call(t),i;(i=n.next())&&!i.done;){var a=i.value;e.call(t,a[0],a[1])}}function R7(t,e){for(var r,n=[];(r=t.exec(e))!==null;)n.push(r);return n}var I7=Io("HTMLFormElement"),k7=function(e){return function(r,n){return e.call(r,n)}}(Object.prototype.hasOwnProperty),xr={isArray:vv,isArrayBuffer:tM,isBuffer:u7,isFormData:y7,isArrayBufferView:c7,isString:f7,isNumber:rM,isObject:nM,isPlainObject:fd,isEmptyObject:h7,isUndefined:Q0,isDate:d7,isFile:p7,isBlob:v7,isFunction:Xb,isStream:g7,isURLSearchParams:_7,isStandardBrowserEnv:b7,forEach:zb,merge:J0,extend:S7,trim:x7,stripBOM:w7,inherits:E7,toFlatObject:T7,kindOf:Gb,kindOfTest:Io,endsWith:A7,toArray:C7,isTypedArray:P7,isFileList:m7,forEachEntry:O7,matchAll:R7,isHTMLForm:I7,hasOwnProperty:k7},iM=xr;function Ll(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}iM.inherits(Ll,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var aM=Ll.prototype,oM={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(t){oM[t]={value:t}});Object.defineProperties(Ll,oM);Object.defineProperty(aM,"isAxiosError",{value:!0});Ll.from=function(t,e,r,n,i,a){var o=Object.create(aM);return iM.toFlatObject(t,o,function(u){return u!==Error.prototype}),Ll.call(o,t.message,e,r,n,i),o.cause=t,o.name=t.name,a&&Object.assign(o,a),o};var ks=Ll,M7=typeof self=="object"?self.FormData:window.FormData,F7=M7,bt=xr,N7=ks,L7=F7;function e_(t){return bt.isPlainObject(t)||bt.isArray(t)}function sM(t){return bt.endsWith(t,"[]")?t.slice(0,-2):t}function wC(t,e,r){return t?t.concat(e).map(function(i,a){return i=sM(i),!r&&a?"["+i+"]":i}).join(r?".":""):e}function D7(t){return bt.isArray(t)&&!t.some(e_)}var B7=bt.toFlatObject(bt,{},null,function(e){return/^is[A-Z]/.test(e)});function j7(t){return t&&bt.isFunction(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator]}function U7(t,e,r){if(!bt.isObject(t))throw new TypeError("target must be an object");e=e||new(L7||FormData),r=bt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!bt.isUndefined(g[v])});var n=r.metaTokens,i=r.visitor||c,a=r.dots,o=r.indexes,s=r.Blob||typeof Blob<"u"&&Blob,u=s&&j7(e);if(!bt.isFunction(i))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(bt.isDate(p))return p.toISOString();if(!u&&bt.isBlob(p))throw new N7("Blob is not supported. Use a Buffer instead.");return bt.isArrayBuffer(p)||bt.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,v,g){var m=p;if(p&&!g&&typeof p=="object"){if(bt.endsWith(v,"{}"))v=n?v:v.slice(0,-2),p=JSON.stringify(p);else if(bt.isArray(p)&&D7(p)||bt.isFileList(p)||bt.endsWith(v,"[]")&&(m=bt.toArray(p)))return v=sM(v),m.forEach(function(_,x){!bt.isUndefined(_)&&e.append(o===!0?wC([v],x,a):o===null?v:v+"[]",l(_))}),!1}return e_(p)?!0:(e.append(wC(g,v,a),l(p)),!1)}var f=[],h=Object.assign(B7,{defaultVisitor:c,convertValue:l,isVisitable:e_});function d(p,v){if(!bt.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(p),bt.forEach(p,function(m,y){var _=!bt.isUndefined(m)&&i.call(e,m,bt.isString(y)?y.trim():y,v,h);_===!0&&d(m,v?v.concat(y):[y])}),f.pop()}}if(!bt.isObject(t))throw new TypeError("data must be an object");return d(t),e}var mv=U7,$7=mv;function EC(t){var e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'\(\)~]|%20|%00/g,function(n){return e[n]})}function lM(t,e){this._pairs=[],t&&$7(t,this,e)}var uM=lM.prototype;uM.append=function(e,r){this._pairs.push([e,r])};uM.toString=function(e){var r=e?function(n){return e.call(this,n,EC)}:EC;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};var cM=lM,V7=xr,G7=cM;function X7(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var fM=function(e,r,n){if(!r)return e;var i=e.indexOf("#");i!==-1&&(e=e.slice(0,i));var a=n&&n.encode||X7,o=V7.isURLSearchParams(r)?r.toString():new G7(r,n).toString(a);return o&&(e+=(e.indexOf("?")===-1?"?":"&")+o),e},z7=xr;function Bf(){this.handlers=[]}Bf.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};Bf.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Bf.prototype.clear=function(){this.handlers&&(this.handlers=[])};Bf.prototype.forEach=function(e){z7.forEach(this.handlers,function(n){n!==null&&e(n)})};var W7=Bf,Y7=xr,hM=function(e,r){Y7.forEach(e,function(i,a){a!==r&&a.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[a])})},dM={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},H7=cM,q7=typeof URLSearchParams<"u"?URLSearchParams:H7,K7=FormData,Z7={isBrowser:!0,classes:{URLSearchParams:q7,FormData:K7,Blob},protocols:["http","https","file","blob","url","data"]},Wb=Z7,Q7=xr,J7=mv,TC=Wb,eK=function(e,r){return J7(e,new TC.classes.URLSearchParams,Object.assign({visitor:function(n,i,a,o){return TC.isNode&&Q7.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},r))},Xa=xr;function tK(t){return Xa.matchAll(/\w+|\[(\w*)]/g,t).map(function(e){return e[0]==="[]"?"":e[1]||e[0]})}function rK(t){var e={},r=Object.keys(t),n,i=r.length,a;for(n=0;n=n.length;if(s=!s&&Xa.isArray(a)?a.length:s,l)return Xa.hasOwnProperty(a,s)?a[s]=[a[s],i]:a[s]=i,!u;(!a[s]||!Xa.isObject(a[s]))&&(a[s]=[]);var c=e(n,i,a[s],o);return c&&Xa.isArray(a[s])&&(a[s]=rK(a[s])),!u}if(Xa.isFormData(t)&&Xa.isFunction(t.entries)){var r={};return Xa.forEachEntry(t,function(n,i){e(tK(n),i,r,0)}),r}return null}var pM=nK,Tg,AC;function iK(){if(AC)return Tg;AC=1;var t=ks;return Tg=function(r,n,i){var a=i.config.validateStatus;!i.status||!a||a(i.status)?r(i):n(new t("Request failed with status code "+i.status,[t.ERR_BAD_REQUEST,t.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))},Tg}var Ag,CC;function aK(){if(CC)return Ag;CC=1;var t=xr;return Ag=t.isStandardBrowserEnv()?function(){return{write:function(n,i,a,o,s,u){var l=[];l.push(n+"="+encodeURIComponent(i)),t.isNumber(a)&&l.push("expires="+new Date(a).toGMTString()),t.isString(o)&&l.push("path="+o),t.isString(s)&&l.push("domain="+s),u===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){var i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Ag}var oK=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},sK=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e},lK=oK,uK=sK,vM=function(e,r){return e&&!lK(r)?uK(e,r):r},Cg,PC;function cK(){if(PC)return Cg;PC=1;var t=xr,e=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Cg=function(n){var i={},a,o,s;return n&&t.forEach(n.split(` +`),function(l){if(s=l.indexOf(":"),a=t.trim(l.slice(0,s)).toLowerCase(),o=t.trim(l.slice(s+1)),a){if(i[a]&&e.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([o]):i[a]=i[a]?i[a]+", "+o:o}}),i},Cg}var Pg,OC;function fK(){if(OC)return Pg;OC=1;var t=xr;return Pg=t.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function a(o){var s=o;return r&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=a(window.location.href),function(s){var u=t.isString(s)?a(s):s;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),Pg}var Og,RC;function gv(){if(RC)return Og;RC=1;var t=ks,e=xr;function r(n,i,a){t.call(this,n??"canceled",t.ERR_CANCELED,i,a),this.name="CanceledError"}return e.inherits(r,t,{__CANCEL__:!0}),Og=r,Og}var Rg,IC;function hK(){return IC||(IC=1,Rg=function(e){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}),Rg}var Ig,kC;function MC(){if(kC)return Ig;kC=1;var t=xr,e=iK(),r=aK(),n=fM,i=vM,a=cK(),o=fK(),s=dM,u=ks,l=gv(),c=hK(),f=Wb;return Ig=function(d){return new Promise(function(v,g){var m=d.data,y=d.headers,_=d.responseType,x=d.withXSRFToken,b;function S(){d.cancelToken&&d.cancelToken.unsubscribe(b),d.signal&&d.signal.removeEventListener("abort",b)}t.isFormData(m)&&t.isStandardBrowserEnv()&&delete y["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var E=d.auth.username||"",T=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";y.Authorization="Basic "+btoa(E+":"+T)}var A=i(d.baseURL,d.url);w.open(d.method.toUpperCase(),n(A,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function O(){if(w){var M="getAllResponseHeaders"in w?a(w.getAllResponseHeaders()):null,B=!_||_==="text"||_==="json"?w.responseText:w.response,j={data:B,status:w.status,statusText:w.statusText,headers:M,config:d,request:w};e(function(J){v(J),S()},function(J){g(J),S()},j),w=null}}if("onloadend"in w?w.onloadend=O:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(O)},w.onabort=function(){w&&(g(new u("Request aborted",u.ECONNABORTED,d,w)),w=null)},w.onerror=function(){g(new u("Network Error",u.ERR_NETWORK,d,w)),w=null},w.ontimeout=function(){var B=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",j=d.transitional||s;d.timeoutErrorMessage&&(B=d.timeoutErrorMessage),g(new u(B,j.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,d,w)),w=null},t.isStandardBrowserEnv()&&(x&&t.isFunction(x)&&(x=x(d)),x||x!==!1&&o(A))){var P=d.xsrfHeaderName&&d.xsrfCookieName&&r.read(d.xsrfCookieName);P&&(y[d.xsrfHeaderName]=P)}"setRequestHeader"in w&&t.forEach(y,function(B,j){typeof m>"u"&&j.toLowerCase()==="content-type"?delete y[j]:w.setRequestHeader(j,B)}),t.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),_&&_!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(b=function(M){w&&(g(!M||M.type?new l(null,d,req):M),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(b),d.signal&&(d.signal.aborted?b():d.signal.addEventListener("abort",b))),!m&&m!==!1&&m!==0&&m!==""&&(m=null);var k=c(A);if(k&&f.protocols.indexOf(k)===-1){g(new u("Unsupported protocol "+k+":",u.ERR_BAD_REQUEST,d));return}w.send(m)})},Ig}var fr=xr,FC=hM,NC=ks,dK=dM,pK=mv,vK=eK,LC=Wb,mK=pM,gK={"Content-Type":"application/x-www-form-urlencoded"};function DC(t,e){!fr.isUndefined(t)&&fr.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function yK(){var t;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(t=MC()),t}function _K(t,e,r){if(fr.isString(t))try{return(e||JSON.parse)(t),fr.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var yv={transitional:dK,adapter:yK(),transformRequest:[function(e,r){FC(r,"Accept"),FC(r,"Content-Type");var n=r&&r["Content-Type"]||"",i=n.indexOf("application/json")>-1,a=fr.isObject(e);a&&fr.isHTMLForm(e)&&(e=new FormData(e));var o=fr.isFormData(e);if(o)return i?JSON.stringify(mK(e)):e;if(fr.isArrayBuffer(e)||fr.isBuffer(e)||fr.isStream(e)||fr.isFile(e)||fr.isBlob(e))return e;if(fr.isArrayBufferView(e))return e.buffer;if(fr.isURLSearchParams(e))return DC(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var s;if(a){if(n.indexOf("application/x-www-form-urlencoded")!==-1)return vK(e,this.formSerializer).toString();if((s=fr.isFileList(e))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return pK(s?{"files[]":e}:e,u&&new u,this.formSerializer)}}return a||i?(DC(r,"application/json"),_K(e)):e}],transformResponse:[function(e){var r=this.transitional||yv.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(e&&fr.isString(e)&&(n&&!this.responseType||i)){var a=r&&r.silentJSONParsing,o=!a&&i;try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?NC.from(s,NC.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:LC.classes.FormData,Blob:LC.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};fr.forEach(["delete","get","head"],function(e){yv.headers[e]={}});fr.forEach(["post","put","patch"],function(e){yv.headers[e]=fr.merge(gK)});var Yb=yv,xK=xr,bK=Yb,SK=function(e,r,n,i){var a=this||bK;return xK.forEach(i,function(s){e=s.call(a,e,r,n)}),e},kg,BC;function mM(){return BC||(BC=1,kg=function(e){return!!(e&&e.__CANCEL__)}),kg}var jC=xr,Mg=SK,wK=mM(),EK=Yb,TK=gv(),UC=hM;function Fg(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new TK}var AK=function(e){Fg(e),e.headers=e.headers||{},e.data=Mg.call(e,e.data,e.headers,null,e.transformRequest),UC(e.headers,"Accept"),UC(e.headers,"Content-Type"),e.headers=jC.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),jC.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||EK.adapter;return r(e).then(function(i){return Fg(e),i.data=Mg.call(e,i.data,i.headers,i.status,e.transformResponse),i},function(i){return wK(i)||(Fg(e),i&&i.response&&(i.response.data=Mg.call(e,i.response.data,i.response.headers,i.response.status,e.transformResponse))),Promise.reject(i)})},an=xr,gM=function(e,r){r=r||{};var n={};function i(c,f){return an.isPlainObject(c)&&an.isPlainObject(f)?an.merge(c,f):an.isEmptyObject(f)?an.merge({},c):an.isPlainObject(f)?an.merge({},f):an.isArray(f)?f.slice():f}function a(c){if(an.isUndefined(r[c])){if(!an.isUndefined(e[c]))return i(void 0,e[c])}else return i(e[c],r[c])}function o(c){if(!an.isUndefined(r[c]))return i(void 0,r[c])}function s(c){if(an.isUndefined(r[c])){if(!an.isUndefined(e[c]))return i(void 0,e[c])}else return i(void 0,r[c])}function u(c){if(c in r)return i(e[c],r[c]);if(c in e)return i(void 0,e[c])}var l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return an.forEach(Object.keys(e).concat(Object.keys(r)),function(f){var h=l[f]||a,d=h(f);an.isUndefined(d)&&h!==u||(n[f]=d)}),n},Ng,$C;function yM(){return $C||($C=1,Ng={version:"0.28.0"}),Ng}var CK=yM().version,Wa=ks,Hb={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Hb[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var VC={};Hb.transitional=function(e,r,n){function i(a,o){return"[Axios v"+CK+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return function(a,o,s){if(e===!1)throw new Wa(i(o," has been removed"+(r?" in "+r:"")),Wa.ERR_DEPRECATED);return r&&!VC[o]&&(VC[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};function PK(t,e,r){if(typeof t!="object")throw new Wa("options must be an object",Wa.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(t),i=n.length;i-- >0;){var a=n[i],o=e[a];if(o){var s=t[a],u=s===void 0||o(s,a,t);if(u!==!0)throw new Wa("option "+a+" must be "+u,Wa.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Wa("Unknown option "+a,Wa.ERR_BAD_OPTION)}}var OK={assertOptions:PK,validators:Hb},qb=xr,RK=fM,GC=W7,XC=AK,_v=gM,IK=vM,_M=OK,$s=_M.validators;function Dl(t){this.defaults=t,this.interceptors={request:new GC,response:new GC}}Dl.prototype.request=function(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=_v(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&_M.assertOptions(n,{silentJSONParsing:$s.transitional($s.boolean),forcedJSONParsing:$s.transitional($s.boolean),clarifyTimeoutError:$s.transitional($s.boolean)},!1);var i=r.paramsSerializer;qb.isFunction(i)&&(r.paramsSerializer={serialize:i});var a=[],o=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(r)===!1||(o=o&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});var s=[];this.interceptors.response.forEach(function(p){s.push(p.fulfilled,p.rejected)});var u;if(!o){var l=[XC,void 0];for(Array.prototype.unshift.apply(l,a),l=l.concat(s),u=Promise.resolve(r);l.length;)u=u.then(l.shift(),l.shift());return u}for(var c=r;a.length;){var f=a.shift(),h=a.shift();try{c=f(c)}catch(d){h(d);break}}try{u=XC(c)}catch(d){return Promise.reject(d)}for(;s.length;)u=u.then(s.shift(),s.shift());return u};Dl.prototype.getUri=function(e){e=_v(this.defaults,e);var r=IK(e.baseURL,e.url);return RK(r,e.params,e.paramsSerializer)};qb.forEach(["delete","get","head","options"],function(e){Dl.prototype[e]=function(r,n){return this.request(_v(n||{},{method:e,url:r,data:(n||{}).data}))}});qb.forEach(["post","put","patch"],function(e){function r(n){return function(a,o,s){return this.request(_v(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Dl.prototype[e]=r(),Dl.prototype[e+"Form"]=r(!0)});var kK=Dl,Lg,zC;function MK(){if(zC)return Lg;zC=1;var t=gv();function e(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(o){n=o});var i=this;this.promise.then(function(a){if(i._listeners){for(var o=i._listeners.length;o-- >0;)i._listeners[o](a);i._listeners=null}}),this.promise.then=function(a){var o,s=new Promise(function(u){i.subscribe(u),o=u}).then(a);return s.cancel=function(){i.unsubscribe(o)},s},r(function(o,s,u){i.reason||(i.reason=new t(o,s,u),n(i.reason))})}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.prototype.subscribe=function(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]},e.prototype.unsubscribe=function(n){if(this._listeners){var i=this._listeners.indexOf(n);i!==-1&&this._listeners.splice(i,1)}},e.source=function(){var n,i=new e(function(o){n=o});return{token:i,cancel:n}},Lg=e,Lg}var Dg,WC;function FK(){return WC||(WC=1,Dg=function(e){return function(n){return e.apply(null,n)}}),Dg}var Bg,YC;function NK(){if(YC)return Bg;YC=1;var t=xr;return Bg=function(r){return t.isObject(r)&&r.isAxiosError===!0},Bg}var t_=xr,LK=eM,hd=kK,DK=gM,BK=Yb,jK=pM;function xM(t){var e=new hd(t),r=LK(hd.prototype.request,e);return t_.extend(r,hd.prototype,e),t_.extend(r,e),r.create=function(i){return xM(DK(t,i))},r}var vn=xM(BK);vn.Axios=hd;vn.CanceledError=gv();vn.CancelToken=MK();vn.isCancel=mM();vn.VERSION=yM().version;vn.toFormData=mv;vn.AxiosError=ks;vn.Cancel=vn.CanceledError;vn.all=function(e){return Promise.all(e)};vn.spread=FK();vn.isAxiosError=NK();vn.formToJSON=function(t){return jK(t_.isHTMLForm(t)?new FormData(t):t)};$b.exports=vn;$b.exports.default=vn;var UK=$b.exports,$K=UK;const Wc=gn($K),ua=t=>new Promise((e,r)=>{Wc.get(t).then(n=>{const i=n.data.toString();e(i)}).catch(n=>{r(n)})});var VK="__lodash_hash_undefined__";function GK(t){return this.__data__.set(t,VK),this}var XK=GK;function zK(t){return this.__data__.has(t)}var WK=zK,YK=Sb,HK=XK,qK=WK;function op(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new YK;++e-1}var uZ=lZ;function cZ(t,e,r){for(var n=-1,i=t==null?0:t.length;++n=CZ){var l=e?null:TZ(t);if(l)return AZ(l);o=!1,i=EZ,u=new bZ}else u=e?[]:s;e:for(;++n{for(const e of t)L.sceneManager.settledScenes.includes(e)?ge.warn(`场景${e}已经加载过,无需再次加载`):(ge.info(`现在预加载场景${e}`),ua(e).then(r=>{ca(r,e,e)}))},MZ=(t,e)=>{L.sceneManager.lockSceneWrite||(L.sceneManager.lockSceneWrite=!0,L.sceneManager.sceneData.sceneStack.push({sceneName:L.sceneManager.sceneData.currentScene.sceneName,sceneUrl:L.sceneManager.sceneData.currentScene.sceneUrl,continueLine:L.sceneManager.sceneData.currentSentenceId}),ua(t).then(r=>{L.sceneManager.sceneData.currentScene=ca(r,e,t),L.sceneManager.sceneData.currentSentenceId=0;const n=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(t);const i=jf(n);Uf(i),ge.debug("现在调用场景,调用结果:",L.sceneManager.sceneData),L.sceneManager.lockSceneWrite=!1,tn()}).catch(r=>{ge.error("场景调用错误",r),L.sceneManager.lockSceneWrite=!1}))},FZ=t=>{const e=t.content.split("/"),r=e[e.length-1];return MZ(t.content,r),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Yc(t,e,r){let n;const a=te.getState().stage.effects.find(o=>o.target===t);if(e.duration=500,r&&typeof r=="number"&&(e.duration=r),n=[e],a){const o={...a.transform,duration:0};n.unshift(o)}else{const o={...e,alpha:0,duration:0};n.unshift(o)}return n}function wM(t,e){const r=L.gameplay.pixiStage.getStageObjByKey(t);function n(){r&&(r.pixiContainer.alphaFilterVal=0)}function i(){r&&(r.pixiContainer.alphaFilterVal=1)}function a(o){if(r){const s=r.pixiContainer,u=L.gameplay.pixiStage.frameDuration,c=1/(e/u*o);s.alphaFilterVal<1&&(s.alpha+=c)}}return{setStartState:n,setEndState:i,tickerFunc:a}}function EM(t,e){const r=L.gameplay.pixiStage.getStageObjByKey(t);function n(){}function i(){r&&(r.pixiContainer.alphaFilterVal=0)}function a(o){if(r){const s=r.pixiContainer,u=L.gameplay.pixiStage.frameDuration,c=1/(e/u*o);s.alphaFilterVal>0&&(s.alphaFilterVal-=c)}}return{setStartState:n,setEndState:i,tickerFunc:a}}const Zb={alpha:1,scale:{x:1,y:1},position:{x:0,y:0},rotation:0,blur:0};function TM(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);iMath.min(Math.max(r,t),e),Ug=.001,LZ=.01,qC=10,DZ=.05,BZ=1;function jZ({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,a;NZ(t<=qC*1e3);let o=1-e;o=r_(DZ,BZ,o),t=r_(LZ,qC,t/1e3),o<1?(i=l=>{const c=l*o,f=c*t,h=c-r,d=n_(l,o),p=Math.exp(-f);return Ug-h/d*p},a=l=>{const f=l*o*t,h=f*r+r,d=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-f),v=n_(Math.pow(l,2),o);return(-i(l)+Ug>0?-1:1)*((h-d)*p)/v}):(i=l=>{const c=Math.exp(-l*t),f=(l-r)*t+1;return-Ug+c*f},a=l=>{const c=Math.exp(-l*t),f=(r-l)*(t*t);return c*f});const s=5/t,u=$Z(i,a,s);if(t=t*1e3,isNaN(u))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(u,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const UZ=12;function $Z(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function XZ(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!KC(t,GZ)&&KC(t,VZ)){const r=jZ(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Qb(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:i}=t,a=TM(t,["from","to","restSpeed","restDelta"]);const o={done:!1,value:e};let{stiffness:s,damping:u,mass:l,velocity:c,duration:f,isResolvedFromDuration:h}=XZ(a),d=ZC,p=ZC;function v(){const g=c?-(c/1e3):0,m=r-e,y=u/(2*Math.sqrt(s*l)),_=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-e)/100,.4)),y<1){const x=n_(_,y);d=b=>{const S=Math.exp(-y*_*b);return r-S*((g+y*_*m)/x*Math.sin(x*b)+m*Math.cos(x*b))},p=b=>{const S=Math.exp(-y*_*b);return y*_*S*(Math.sin(x*b)*(g+y*_*m)/x+m*Math.cos(x*b))-S*(Math.cos(x*b)*(g+y*_*m)-x*m*Math.sin(x*b))}}else if(y===1)d=x=>r-Math.exp(-_*x)*(m+(g+_*m)*x);else{const x=_*Math.sqrt(y*y-1);d=b=>{const S=Math.exp(-y*_*b),w=Math.min(x*b,300);return r-S*((g+y*_*m)*Math.sinh(w)+x*m*Math.cosh(w))/x}}}return v(),{next:g=>{const m=d(g);if(h)o.done=g>=f;else{const y=p(g)*1e3,_=Math.abs(y)<=n,x=Math.abs(r-m)<=i;o.done=_&&x}return o.value=o.done?r:m,o},flipTarget:()=>{c=-c,[e,r]=[r,e],v()}}}Qb.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const ZC=t=>0,AM=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},Jb=(t,e,r)=>-r*t+r*e+t,CM=(t,e)=>r=>Math.max(Math.min(r,e),t),bc=t=>t%1?Number(t.toFixed(5)):t,sp=/(-)?([\d]*\.?[\d])+/g,i_=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,zZ=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function $f(t){return typeof t=="string"}const xv={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},PM=Object.assign(Object.assign({},xv),{transform:CM(0,1)});Object.assign(Object.assign({},xv),{default:1});const WZ=t=>({test:e=>$f(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Sc=WZ("%");Object.assign(Object.assign({},Sc),{parse:t=>Sc.parse(t)/100,transform:t=>Sc.transform(t*100)});const eS=(t,e)=>r=>!!($f(r)&&zZ.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),OM=(t,e,r)=>n=>{if(!$f(n))return n;const[i,a,o,s]=n.match(sp);return{[t]:parseFloat(i),[e]:parseFloat(a),[r]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},es={test:eS("hsl","hue"),parse:OM("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Sc.transform(bc(e))+", "+Sc.transform(bc(r))+", "+bc(PM.transform(n))+")"},YZ=CM(0,255),$g=Object.assign(Object.assign({},xv),{transform:t=>Math.round(YZ(t))}),eo={test:eS("rgb","red"),parse:OM("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+$g.transform(t)+", "+$g.transform(e)+", "+$g.transform(r)+", "+bc(PM.transform(n))+")"};function HZ(t){let e="",r="",n="",i="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),i=t.substr(4,1),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const a_={test:eS("#"),parse:HZ,transform:eo.transform},bv={test:t=>eo.test(t)||a_.test(t)||es.test(t),parse:t=>eo.test(t)?eo.parse(t):es.test(t)?es.parse(t):a_.parse(t),transform:t=>$f(t)?t:t.hasOwnProperty("red")?eo.transform(t):es.transform(t)},RM="${c}",IM="${n}";function qZ(t){var e,r,n,i;return isNaN(t)&&$f(t)&&((r=(e=t.match(sp))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((i=(n=t.match(i_))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function kM(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0;const n=t.match(i_);n&&(r=n.length,t=t.replace(i_,RM),e.push(...n.map(bv.parse)));const i=t.match(sp);return i&&(t=t.replace(sp,IM),e.push(...i.map(xv.parse))),{values:e,numColors:r,tokenised:t}}function MM(t){return kM(t).values}function FM(t){const{values:e,numColors:r,tokenised:n}=kM(t),i=e.length;return a=>{let o=n;for(let s=0;stypeof t=="number"?0:t;function ZZ(t){const e=MM(t);return FM(t)(e.map(KZ))}const NM={test:qZ,parse:MM,createTransformer:FM,getAnimatableNone:ZZ};function Vg(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function QC({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,a=0,o=0;if(!e)i=a=o=r;else{const s=r<.5?r*(1+e):r+e-r*e,u=2*r-s;i=Vg(u,s,t+1/3),a=Vg(u,s,t),o=Vg(u,s,t-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}const QZ=(t,e,r)=>{const n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},JZ=[a_,eo,es],JC=t=>JZ.find(e=>e.test(t)),LM=(t,e)=>{let r=JC(t),n=JC(e),i=r.parse(t),a=n.parse(e);r===es&&(i=QC(i),r=eo),n===es&&(a=QC(a),n=eo);const o=Object.assign({},i);return s=>{for(const u in o)u!=="alpha"&&(o[u]=QZ(i[u],a[u],s));return o.alpha=Jb(i.alpha,a.alpha,s),r.transform(o)}},eQ=t=>typeof t=="number",tQ=(t,e)=>r=>e(t(r)),DM=(...t)=>t.reduce(tQ);function BM(t,e){return eQ(t)?r=>Jb(t,e,r):bv.test(t)?LM(t,e):UM(t,e)}const jM=(t,e)=>{const r=[...t],n=r.length,i=t.map((a,o)=>BM(a,e[o]));return a=>{for(let o=0;o{const r=Object.assign(Object.assign({},t),e),n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=BM(t[i],e[i]));return i=>{for(const a in n)r[a]=n[a](i);return r}};function eP(t){const e=NM.parse(t),r=e.length;let n=0,i=0,a=0;for(let o=0;o{const r=NM.createTransformer(e),n=eP(t),i=eP(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?DM(jM(n.parsed,i.parsed),r):o=>`${o>0?e:t}`},nQ=(t,e)=>r=>Jb(t,e,r);function iQ(t){if(typeof t=="number")return nQ;if(typeof t=="string")return bv.test(t)?LM:UM;if(Array.isArray(t))return jM;if(typeof t=="object")return rQ}function aQ(t,e,r){const n=[],i=r||iQ(t[0]),a=t.length-1;for(let o=0;or(AM(t,e,n))}function sQ(t,e){const r=t.length,n=r-1;return i=>{let a=0,o=!1;if(i<=t[0]?o=!0:i>=t[n]&&(a=n-1,o=!0),!o){let u=1;for(;ui||u===n);u++);a=u-1}const s=AM(t[a],t[a+1],i);return e[a](s)}}function $M(t,e,{clamp:r=!0,ease:n,mixer:i}={}){const a=t.length;HC(a===e.length),HC(!n||!Array.isArray(n)||n.length===a-1),t[0]>t[a-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const o=aQ(e,n,i),s=a===2?oQ(t,o):sQ(t,o);return r?u=>s(r_(t[0],t[a-1],u)):s}const lQ=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,uQ=t=>e=>Math.pow(e,t),cQ=t=>e=>e*e*((t+1)*e-t),fQ=t=>{const e=cQ(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))},hQ=1.525,dQ=uQ(2),pQ=lQ(dQ);fQ(hQ);function vQ(t,e){return t.map(()=>e||pQ).splice(0,t.length-1)}function mQ(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function gQ(t,e){return t.map(r=>r*e)}function dd({from:t=0,to:e=1,ease:r,offset:n,duration:i=300}){const a={done:!1,value:t},o=Array.isArray(e)?e:[t,e],s=gQ(n&&n.length===o.length?n:mQ(o),i);function u(){return $M(s,o,{ease:Array.isArray(r)?r:vQ(o,r)})}let l=u();return{next:c=>(a.value=l(c),a.done=c>=i,a),flipTarget:()=>{o.reverse(),l=u()}}}function yQ({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:a}){const o={done:!1,value:e};let s=r*t;const u=e+s,l=a===void 0?u:a(u);return l!==u&&(s=l-e),{next:c=>{const f=-s*Math.exp(-c/n);return o.done=!(f>i||f<-i),o.value=o.done?l:l+f,o},flipTarget:()=>{}}}const tP={keyframes:dd,spring:Qb,decay:yQ};function _Q(t){if(Array.isArray(t.to))return dd;if(tP[t.type])return tP[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?dd:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Qb:dd}const VM=1/60*1e3,xQ=typeof performance<"u"?()=>performance.now():()=>Date.now(),GM=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(xQ()),VM);function bQ(t){let e=[],r=[],n=0,i=!1,a=!1;const o=new WeakSet,s={schedule:(u,l=!1,c=!1)=>{const f=c&&i,h=f?e:r;return l&&o.add(u),h.indexOf(u)===-1&&(h.push(u),f&&i&&(n=e.length)),u},cancel:u=>{const l=r.indexOf(u);l!==-1&&r.splice(l,1),o.delete(u)},process:u=>{if(i){a=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let l=0;l(t[e]=bQ(()=>Hc=!0),t),{}),wQ=Vf.reduce((t,e)=>{const r=Sv[e];return t[e]=(n,i=!1,a=!1)=>(Hc||AQ(),r.schedule(n,i,a)),t},{}),EQ=Vf.reduce((t,e)=>(t[e]=Sv[e].cancel,t),{});Vf.reduce((t,e)=>(t[e]=()=>Sv[e].process(wc),t),{});const TQ=t=>Sv[t].process(wc),XM=t=>{Hc=!1,wc.delta=o_?VM:Math.max(Math.min(t-wc.timestamp,SQ),1),wc.timestamp=t,s_=!0,Vf.forEach(TQ),s_=!1,Hc&&(o_=!1,GM(XM))},AQ=()=>{Hc=!0,o_=!0,s_||GM(XM)},CQ=wQ;function zM(t,e,r=0){return t-e-r}function PQ(t,e,r=0,n=!0){return n?zM(e+-t,e,r):e-(t-e)+r}function OQ(t,e,r,n){return n?t>=e+r:t<=-r}const RQ=t=>{const e=({delta:r})=>t(r);return{start:()=>CQ.update(e,!0),stop:()=>EQ.update(e)}};function IQ(t){var e,r,{from:n,autoplay:i=!0,driver:a=RQ,elapsed:o=0,repeat:s=0,repeatType:u="loop",repeatDelay:l=0,onPlay:c,onStop:f,onComplete:h,onRepeat:d,onUpdate:p}=t,v=TM(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=v,m,y=0,_=v.duration,x,b=!1,S=!0,w;const E=_Q(v);!((r=(e=E).needsInterpolation)===null||r===void 0)&&r.call(e,n,g)&&(w=$M([0,100],[n,g],{clamp:!1}),n=0,g=100);const T=E(Object.assign(Object.assign({},v),{from:n,to:g}));function A(){y++,u==="reverse"?(S=y%2===0,o=PQ(o,_,l,S)):(o=zM(o,_,l),u==="mirror"&&T.flipTarget()),b=!1,d&&d()}function O(){m.stop(),h&&h()}function P(M){if(S||(M=-M),o+=M,!b){const B=T.next(Math.max(0,o));x=B.value,w&&(x=w(x)),b=S?B.done:o<=0}p==null||p(x),b&&(y===0&&(_??(_=o)),y{f==null||f(),m.stop()}}}function kQ(t,e){for(var r=-1,n=t==null?0:t.length;++rs))return!1;var l=a.get(t),c=a.get(e);if(l&&c)return l==e&&c==t;var f=-1,h=!0,d=r&BQ?new FQ:void 0;for(a.set(t,e),a.set(e,t);++f0&&(u=IQ({to:a,offset:o,duration:r,onUpdate:m=>{if(s){const{scaleX:y,scaleY:_,...x}=m;Object.assign(s,zg(x,ga)),ga(y)||(s.scale.x=y),ga(_)||(s.scale.y=_)}}}));const{duration:l,...c}=v();te.dispatch(hr.updateEffect({target:e,transform:c}));function f(){if(n!=null&&n.pixiContainer){const{position:m,scale:y,..._}=p(),x=zg({x:m.x,y:m.y,..._},ga);Object.assign(n==null?void 0:n.pixiContainer,x),n!=null&&n.pixiContainer&&(ga(y.x)||(n.pixiContainer.scale.x=y.x),ga(y==null?void 0:y.y)||(n.pixiContainer.scale.y=y.y))}}function h(){if(u&&u.stop(),u=null,n!=null&&n.pixiContainer){const{position:m,scale:y,..._}=v(),x=zg({x:m.x,y:m.y,..._},ga);Object.assign(n==null?void 0:n.pixiContainer,x),n!=null&&n.pixiContainer&&(ga(y.x)||(n.pixiContainer.scale.x=y.x),ga(y==null?void 0:y.y)||(n.pixiContainer.scale.y=y.y))}}function d(m){}function p(){return t[0]}function v(){return t[t.length-1]}function g(){const m=t[t.length-1],{alpha:y,rotation:_,blur:x,duration:b,scale:S,position:w,...E}=m;return E}return{setStartState:f,setEndState:h,tickerFunc:d,getEndFilterEffect:g}}function lp(t,e,r){const n=L.animationManager.getAnimations().find(i=>i.name===t);if(n){const i=n.effects.map(a=>{const o=te.getState().stage.effects.find(u=>u.target===e),s=zt({...(o==null?void 0:o.transform)??Zb,duration:0});return Object.assign(s,a),s.duration=a.duration,s});return ge.debug("装载自定义动画",i),rF(i,e,r)}return null}function En(t){const e=L.animationManager.getAnimations().find(r=>r.name===t);if(e){let r=0;return e.effects.forEach(n=>{r+=n.duration}),r}return 0}function Ka(t,e,r=!1,n){if(e==="enter"){let i=500;r&&(i=1500);let a=wM(n??t,i);const o=L.animationManager.nextEnterAnimationName.get(t);return o&&(ge.debug("取代默认进入动画",t),a=lp(o,n??t,En(o)),i=En(o),L.animationManager.nextEnterAnimationName.delete(t)),{duration:i,animation:a}}else{let i=750;r&&(i=1500);let a=EM(n??t,i);const o=L.animationManager.nextExitAnimationName.get(t);return o&&(ge.debug("取代默认退出动画",t),a=lp(o,n??t,En(o)),i=En(o),L.animationManager.nextExitAnimationName.delete(t)),{duration:i,animation:a}}}const zte=t=>{const e=t.content;let r="",n="default";t.args.forEach(l=>{l.key==="unlockname"&&(r=l.value.toString()),l.key==="series"&&(n=l.value.toString())});const i=te.dispatch;r!==""&&i(Wk({name:r,url:e,series:n})),i(hr.removeEffectByTargetId("bg-main"));const a=He(t,"transform");let o=He(t,"duration");(!o||typeof o!="number")&&(o=1e3);let s;if(a)try{const l=JSON.parse(a.toString());s=Yc("bg-main",l,o),s[0].alpha=0;const c=(Math.random()*10).toString(16),f={name:c,effects:s};L.animationManager.addAnimation(f),o=En(c),L.animationManager.nextEnterAnimationName.set("bg-main",c)}catch{u()}else u();function u(){s=Yc("bg-main",{},o),s[0].alpha=0;const c=(Math.random()*10).toString(16),f={name:c,effects:s};L.animationManager.addAnimation(f),o=En(c),L.animationManager.nextEnterAnimationName.set("bg-main",c)}return He(t,"enter")&&(L.animationManager.nextEnterAnimationName.set("bg-main",He(t,"enter").toString()),o=En(He(t,"enter").toString())),He(t,"exit")&&(L.animationManager.nextExitAnimationName.set("bg-main-off",He(t,"exit").toString()),o=En(He(t,"exit").toString())),i(Ge({key:"bgName",value:t.content})),{performName:"none",duration:o,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Wte(t){let e="center",r=t.content,n=!1,i="",a="",o="",s=500,u="",l="",c="",f="",h="",d="",p="",v=-1;const g=te.dispatch;for(const w of t.args)switch(w.key){case"left":w.value===!0&&(e="left");break;case"right":w.value===!0&&(e="right");break;case"clear":w.value===!0&&(r="");break;case"id":n=!0,o=w.value.toString();break;case"motion":i=w.value.toString();break;case"bounds":p=String(w.value);break;case"expression":a=w.value.toString();break;case"mouthOpen":u=w.value.toString(),u=Nn(u,Fn.figure);break;case"mouthClose":l=w.value.toString(),l=Nn(l,Fn.figure);break;case"mouthHalfOpen":c=w.value.toString(),c=Nn(c,Fn.figure);break;case"eyesOpen":f=w.value.toString(),f=Nn(f,Fn.figure);break;case"eyesClose":h=w.value.toString(),h=Nn(h,Fn.figure);break;case"animationFlag":d=w.value.toString();break;case"none":r="";break;case"zIndex":v=Number(w.value);break}const m=o||`fig-${e}`,_=te.getState().stage.figureAssociatedAnimation.filter(w=>w.targetId!==m),x={targetId:m,animationFlag:d,mouthAnimation:{open:u,close:l,halfOpen:c},blinkAnimation:{open:f,close:h}};_.push(x),g(Ge({key:"figureAssociatedAnimation",value:_}));let b=!0;if(o!==""){const w=te.getState().stage.freeFigure.find(E=>E.key===o);w&&w.name===t.content&&(b=!1)}else e==="center"&&te.getState().stage.figName===t.content&&(b=!1),e==="left"&&te.getState().stage.figNameLeft===t.content&&(b=!1),e==="right"&&te.getState().stage.figNameRight===t.content&&(b=!1);if(b){const w=`fig-${e}`,E=`${o}`;te.dispatch(hr.removeEffectByTargetId(w)),te.dispatch(hr.removeEffectByTargetId(E)),g(hr.setFigureMetaData([w,"zIndex",0,!0])),g(hr.setFigureMetaData([E,"zIndex",0,!0]))}const S=(w,E)=>{const T=He(E,"transform"),A=He(E,"duration");A&&typeof A=="number"&&(s=A);let O;if(T){console.log(T);try{const B=JSON.parse(T.toString());O=Yc(w,B,s),O[0].alpha=0;const j=(Math.random()*10).toString(16),z={name:j,effects:O};L.animationManager.addAnimation(z),s=En(j),L.animationManager.nextEnterAnimationName.set(w,j)}catch{P()}}else P();function P(){O=Yc(w,{},s),O[0].alpha=0;const j=(Math.random()*10).toString(16),z={name:j,effects:O};L.animationManager.addAnimation(z),s=En(j),L.animationManager.nextEnterAnimationName.set(w,j)}const k=He(E,"enter"),M=He(E,"exit");k&&(L.animationManager.nextEnterAnimationName.set(w,k.toString()),s=En(k.toString())),M&&(L.animationManager.nextExitAnimationName.set(w+"-off",M.toString()),s=En(M.toString()))};if(n){const w={key:o,name:r,basePosition:e};S(o,t),(i||p)&&g(hr.setLive2dMotion({target:o,motion:i,overrideBounds:gP(p)})),a&&g(hr.setLive2dExpression({target:o,expression:a})),v>0&&g(hr.setFigureMetaData([o,"zIndex",v,!1])),g(hr.setFreeFigureByKey(w))}else{const w={center:"fig-center",left:"fig-left",right:"fig-right"},E={center:"figName",left:"figNameLeft",right:"figNameRight"};o=w[e],S(o,t),(i||p)&&g(hr.setLive2dMotion({target:o,motion:i,overrideBounds:gP(p)})),a&&g(hr.setLive2dExpression({target:o,expression:a})),v>0&&g(hr.setFigureMetaData([o,"zIndex",v,!1])),g(Ge({key:E[e],value:r}))}return{performName:"none",duration:s,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}}function gP(t){const e=t.split(",").map(n=>Number(n));let r=!0;if(e.forEach(n=>{isNaN(n)&&(r=!1)}),r=r&&e.length===4,r)return e}const nF=(t,e)=>{L.sceneManager.lockSceneWrite||(L.sceneManager.lockSceneWrite=!0,ua(t).then(r=>{L.sceneManager.sceneData.currentScene=ca(r,e,t),L.sceneManager.sceneData.currentSentenceId=0;const n=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(t);const i=jf(n);Uf(i),ge.debug("现在切换场景,切换后的结果:",L.sceneManager.sceneData),L.sceneManager.lockSceneWrite=!1,tn()}).catch(r=>{ge.error("场景调用错误",r),L.sceneManager.lockSceneWrite=!1}))},Yte=t=>{const e=t.content.split("/"),r=e[e.length-1];return nF(t.content,r),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},iF=t=>{const e=L.sceneManager.sceneData.currentSentenceId;let r=e;L.sceneManager.sceneData.currentScene.sentenceList.forEach((n,i)=>{n.command===Qe.label&&n.content===t&&i!==e&&(r=i)}),L.sceneManager.sceneData.currentSentenceId=r,setTimeout(tn,1)},Hte="_Choose_Main_1kza1_1",qte="_Choose_item_1kza1_13",Kte="_Choose_item_disabled_1kza1_34",Zte="_Choose_item_outer_1kza1_50",gh={Choose_Main:Hte,Choose_item:qte,Choose_item_disabled:Kte,Choose_item_outer:Zte},Qte=""+new URL("page-flip-1-7df32409.mp3",import.meta.url).href,Jte=""+new URL("switch-1-99b576bc.mp3",import.meta.url).href,aF="data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU3LjE0LjEwMAAAAAAAAAAAAAAA//OAAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAHAAAGhgA/Pz8/Pz8/Pz8/Pz8/P19fX19fX19fX19fX19ff39/f39/f39/f39/f3+fn5+fn5+fn5+fn5+fn5+/v7+/v7+/v7+/v7+/v9/f39/f39/f39/f39/f//////////////////8AAAAATGF2YzU3LjE1AAAAAAAAAAAAAAAAJAAAAAAAAAAABoYV32R7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/zgGQAAAABpAAAAAAAAANIAAAAACADH/+QtN3NAAAKF6IiVEl7hE0Sv/+XsgGgCgQDQFAgGg3D+yBShQzd+K0qXyBQyRQUp3hEkUMGn/8oCBQ5KOIf+sPl3//+Xf/+GP//6w+EgFgk/nOfWhA4Q4ABxjnQhDhCD3pgIQLAARlkyZ8Ew+Ud1AgUOfy7/4OeGOUORPD//wwUd/KHP//+GPykMA445BCHBIYg4ZC4AyGP+PuWtgyRb6quwuJvp+v8wQwDAKoXYMnpC0w6gAc0HLf/84JkuwnkuN6ioaAAD3CpsVVFMAAFQBkWjRnE4hYMOnIaT5sXEGFHCyMLPhfcDTHTUmRcgnQMuCfCKHjcDRlTchxFTcEHsKGiBNQ6mLhLkNImWi8PkY6s3kUWgaJmjd1igSfFzk+gLLIOcMi4gXyupR9A20G/4zAhOJ/PDgGYKI4y4LMEEBYhnUz1lpozrmZk3//lsky4s+TB4ul8ny6YOV0FmRx0ElHlMbNWYOr///1uZFQ3IGRNBRmfWlRUYkeV8mVhC5j/+UOiwF4DdcGgB//zgmTqHCnhQS/NUAGcStp6X4JQAARBgQCDIwGbMjrzxBIRk8s4+IS7mMEYN4elXLheFicbuxm88zzzHaw/G//9DCJ+eYRf8WGFtZp9ydCUvPMKGf/57ZjPRjzHtq+3//+YZ2U8817jxbb1vcn/1yAPkAgGUJuPiliw1FHilYbAAkIkV4CdGauxnChrTd+JTOW4BTlAB55YoeqaxWm7Wv8xLqLOiiZLUixqapJF5JNAcoviEoN2gAwAUcLiN5Mk6i3TRU+ikk++6KKKTqSKyBsx//OCZFMVigU/GuzMAIuQEq5fwxACNMZGRPKvoqXbR0UbJP11I0t9J/SqSrRZ0lXoqetSTnWoto0kl26LJGJqizoJmtJSSNSWk7WdTpXUkiigbVor9K6lpKSrdFNi8gnstA65dQVWxkXlGyTGRiRt9gUkBwgAggllBkQbKigffEMUfzqlL+6Ruli5Bv+4lPf//////X/////o0Wte9XLYBs4JbHGkwql7GrPNPMusqAJDUPzthoURwGi5eZyu+VuecNrURSYBU/p8//81Vf+Znkn/84JkNA4gwTcvDYYmF1lmTbAzByQpycp3ROJPn025p4SQJoSeFQoViUUAoiJFRL3c8JRUNETudLFn0MtLDwrM4lUeOiJtiztbvBk6xyPrctYdEkBpA09q2Xn9/TmkZxYMuXBUW17I4clP/nKrXbW/C6FI5G0z11z31L9fvGqoAzY1X86WwYUHIdWCvLEwkeEq3kQ7iI8MPM/ssO/8OnlHsFW1nWeCvyzwVOtEvHuyqv/8hOYSETL//NtNaySXOSsAqIiRrkS82UvXUvppbobMbv/zgmQhC0HzBAAEwpKVEO4JYAjTIJ/y/0egY3vXWaZv65cpZm36G/mMUpdalcpStzalb1KXUoUBf8pXKyGM5Sv/TRRPKoUSQMYKTJfSwiUDeW+ZhhmIXNYfiyfSbiqFFLNEQaajFVnrO9YLTodKvET9Z0FcSgq6s6eIz3uLcFQmCxJY06W/g0Cri31AqGrq56EgaXxLPCUNdBZ5USrBUse3BqpNF93yP//yMyMDWEJGQ01////MjMv//I1kcjJrLf/stlzL55SkyyOX5q0cjVrL//OCZC4KtfrOGgAjbodYBawMAEQAYf//+Rk1qGRqygo5GRq1sP/sln//cyNWCg0cj//ZZZZKh+asCHP8lAL////9n/////////GMYm3raaWKige/+sW+LesVTEFNRTMuOTkuNaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo=",ere=""+new URL("dialog-d5b91235.mp3",import.meta.url).href,oF="data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjIzLjEwMQAAAAAAAAAAAAAA//OAAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAHAAAGhgA/Pz8/Pz8/Pz8/Pz8/P19fX19fX19fX19fX19ff39/f39/f39/f39/f3+fn5+fn5+fn5+fn5+fn5+/v7+/v7+/v7+/v7+/v9/f39/f39/f39/f39/f//////////////////8AAAAATGF2YzU4LjQwAAAAAAAAAAAAAAAAJAL7AAAAAAAABobgvJxkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/zgGQADLH/PRigiACM0AZ+XUAQAoAVYA9AY3IAASAgeRjeQMhP0O/nec/1cn+Qnv/8n+RuhGUhPoQDPISc6HP1Oec7+pwAROeQikI3IT////z+p3Q56VOd/nOc5JzyAAhQAAI053QDFnoQjKACGvoQ7yThzoBgZ8ADMJQURtuNAkMH4P4P+XOZD4f5d/D/64f/3co7/8H8u/wQ5R3/+sPiN8TvB95SDgYT/yjgQf+mpbd5dJrdLkpewIOA5GsDQUQZnZzSB6Q1U50Guqy9OaH/84JkIg/hbXkux6gBEfpLBx+SKAZQvxWLwbxAAoJRbMJjWBoPcgIzjpzzz2clFsxj0ITlVELLXdjzyg8Q3UoM0PPct+QCw/6D5KMrNmLdXOUnPRjXJ3nMYVFVfnfdzf//q//MR+Q/8uwB0uyB/lVHlY6YhEIGR4cHYHAcAZwSQAJAcAocdAxoAMh6L1HV969TxECi7iHlYn7jW//an//+JXU5/9v4l//6EM3f83/41j3///+ozd63/9C2p2W2W22i0Mq2OVytAvxB06nWCVQIZP/zgmQXD4W5ey/HqAEQUkbOR4koAmYRklcoUe+Yd1AuC8AHmsVSoIxFCwPh6RI8ajdB8807yw/JxoLbsai/djzjScCv+Q/lARCSFyRC8hIFYZkF06Dv//MLs5zV+edqzv6krdvP9V/yO3p66H//n73UnMetFzzx4P/MNxBOVut0AFwIAARCgysYSXL+VO2TXhMWBADVCKKhQmjLmX/////0/P+rf7f///29++FO9LfYWYp//Z9n/yHlg30VsPil34MMSQVrYqfLAYVacpCtK1Oq//OCZBUPGaFC3+e0AA8ZVoZdyxAA2az68kOa28sO3puYoqNkUTUxnD6CKnSNlGTJJositaK2TdJSb2NWSX/SSScyDlAnQ6myTv/1X0aJePGZqjnT1FL6v9SRkXW/dVaKP6VaKLOv//+r//X/ZzF06dSFLuv/1B0aZUKwhImgCMAB2aHaUe7x55QPP/rp3zyZZf/VkdS3RFZ3m/9H//iSCn/1Qaev/0CVH3+oO1P///1t+j//9KoPL7QDcAaC4x+83dEEEvXL3vljkRVf5ZqiVpT/84JkGw5BSSx+MMpOEjoual7AxBzqOG5mzBJL6c7URxGtROS/Zu8vMwc2/naKcgTgLi5R79f/ZSUVjWOSaa1aHK5xM/apQnJHJUuTbXQ5VN09HRzSUNfirDtAVBYCwdfpJmYrjDVue/9pJZFMiSvSUMuMAg40uvlBXQECFUh3VKcOGoUBJAurXLsY3+xpv///1aZAwAP///yghpkdW/5qt8OMEMKKg7/pDn///h1/Ues6P/xLEaAkoyibeSeC8E+AuhymiEos8tLHJNRoThxKnP/zgmQcDD0TFAk8xToRuh4sCGgPKooy1Y8s/q2X/ZH//6tqJAEEQwRKxjI9y1KWWqPDw8awiKqQPPob/pRUDwAioCEtX9R7/9eGlncrLPLBVgKmRZ+GpD/tqEogdIXwLlNkUnUxiamSS0W/ooqUlrot//zUCIHRc05Zrqaabod86PDZv/+b/UamAIGjTP+W/879s9liLSrmCVxXgq7xL+RKoQZ+UAAwBYQh4Rig2ZaVmytcNUuiO5/zP8jP1/+VMy/1RygyCgEMDDLv4CCZF3/S//OCZC8JaK7qfiQiTgxILdAAYYYEEhVLrP///S1HoCosaCoCCYZrZUSBkQDwESH/WkJSAZjByJI0oE4Z/////4FCQeBkVZ/xX/zIsRd/6hf7X//4qSfqwEEiLv1ciEyISQKqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqo=";var sF={exports:{}},lF={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -58,7 +58,7 @@ Add a component higher in the tree to provide a loading * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Bl=ne;function ere(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var tre=typeof Object.is=="function"?Object.is:ere,rre=Bl.useState,nre=Bl.useEffect,ire=Bl.useLayoutEffect,are=Bl.useDebugValue;function ore(t,e){var r=e(),n=rre({inst:{value:r,getSnapshot:e}}),i=n[0].inst,a=n[1];return ire(function(){i.value=r,i.getSnapshot=e,Wg(i)&&a({inst:i})},[t,r,e]),nre(function(){return Wg(i)&&a({inst:i}),t(function(){Wg(i)&&a({inst:i})})},[t]),are(r),r}function Wg(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!tre(t,r)}catch{return!0}}function sre(t,e){return e()}var lre=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?sre:ore;sF.useSyncExternalStore=Bl.useSyncExternalStore!==void 0?Bl.useSyncExternalStore:lre;oF.exports=sF;var ure=oF.exports,lF={exports:{}},uF={};/** + */var Bl=ne;function tre(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var rre=typeof Object.is=="function"?Object.is:tre,nre=Bl.useState,ire=Bl.useEffect,are=Bl.useLayoutEffect,ore=Bl.useDebugValue;function sre(t,e){var r=e(),n=nre({inst:{value:r,getSnapshot:e}}),i=n[0].inst,a=n[1];return are(function(){i.value=r,i.getSnapshot=e,Wg(i)&&a({inst:i})},[t,r,e]),ire(function(){return Wg(i)&&a({inst:i}),t(function(){Wg(i)&&a({inst:i})})},[t]),ore(r),r}function Wg(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!rre(t,r)}catch{return!0}}function lre(t,e){return e()}var ure=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?lre:sre;lF.useSyncExternalStore=Bl.useSyncExternalStore!==void 0?Bl.useSyncExternalStore:ure;sF.exports=lF;var cre=sF.exports,uF={exports:{}},cF={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -66,14 +66,14 @@ Add a component higher in the tree to provide a loading * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Tv=ne,cre=ure;function fre(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var hre=typeof Object.is=="function"?Object.is:fre,dre=cre.useSyncExternalStore,pre=Tv.useRef,vre=Tv.useEffect,mre=Tv.useMemo,gre=Tv.useDebugValue;uF.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var a=pre(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=mre(function(){function u(d){if(!l){if(l=!0,c=d,d=n(d),i!==void 0&&o.hasValue){var p=o.value;if(i(p,d))return f=p}return f=d}if(p=f,hre(c,d))return p;var v=n(d);return i!==void 0&&i(p,v)?p:(c=d,f=v)}var l=!1,c,f,h=r===void 0?null:r;return[function(){return u(e())},h===null?void 0:function(){return u(h())}]},[e,r,n,i]);var s=dre(t,a[0],a[1]);return vre(function(){o.hasValue=!0,o.value=s},[s]),gre(s),s};lF.exports=uF;var yre=lF.exports;function _re(t){t()}let cF=_re;const xre=t=>cF=t,bre=()=>cF,gP=Symbol.for("react-redux-context"),yP=typeof globalThis<"u"?globalThis:{};function Sre(){var t;if(!ne.createContext)return{};const e=(t=yP[gP])!=null?t:yP[gP]=new Map;let r=e.get(ne.createContext);return r||(r=ne.createContext(null),e.set(ne.createContext,r)),r}const Eo=Sre();function nS(t=Eo){return function(){return ne.useContext(t)}}const fF=nS(),wre=()=>{throw new Error("uSES not initialized!")};let hF=wre;const Ere=t=>{hF=t},Tre=(t,e)=>t===e;function Are(t=Eo){const e=t===Eo?fF:nS(t);return function(n,i={}){const{equalityFn:a=Tre,stabilityCheck:o=void 0,noopCheck:s=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:u,subscription:l,getServerState:c,stabilityCheck:f,noopCheck:h}=e();ne.useRef(!0);const d=ne.useCallback({[n.name](v){return n(v)}}[n.name],[n,f,o]),p=hF(l.addNestedSub,u.getState,c||u.getState,d,a);return ne.useDebugValue(p),p}}const Ne=Are();function Cre(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a=0)&&(r[i]=t[i]);return r}var dF={exports:{}},pt={};/** @license React v16.13.1 + */var Tv=ne,fre=cre;function hre(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var dre=typeof Object.is=="function"?Object.is:hre,pre=fre.useSyncExternalStore,vre=Tv.useRef,mre=Tv.useEffect,gre=Tv.useMemo,yre=Tv.useDebugValue;cF.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var a=vre(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=gre(function(){function u(d){if(!l){if(l=!0,c=d,d=n(d),i!==void 0&&o.hasValue){var p=o.value;if(i(p,d))return f=p}return f=d}if(p=f,dre(c,d))return p;var v=n(d);return i!==void 0&&i(p,v)?p:(c=d,f=v)}var l=!1,c,f,h=r===void 0?null:r;return[function(){return u(e())},h===null?void 0:function(){return u(h())}]},[e,r,n,i]);var s=pre(t,a[0],a[1]);return mre(function(){o.hasValue=!0,o.value=s},[s]),yre(s),s};uF.exports=cF;var _re=uF.exports;function xre(t){t()}let fF=xre;const bre=t=>fF=t,Sre=()=>fF,yP=Symbol.for("react-redux-context"),_P=typeof globalThis<"u"?globalThis:{};function wre(){var t;if(!ne.createContext)return{};const e=(t=_P[yP])!=null?t:_P[yP]=new Map;let r=e.get(ne.createContext);return r||(r=ne.createContext(null),e.set(ne.createContext,r)),r}const Eo=wre();function iS(t=Eo){return function(){return ne.useContext(t)}}const hF=iS(),Ere=()=>{throw new Error("uSES not initialized!")};let dF=Ere;const Tre=t=>{dF=t},Are=(t,e)=>t===e;function Cre(t=Eo){const e=t===Eo?hF:iS(t);return function(n,i={}){const{equalityFn:a=Are,stabilityCheck:o=void 0,noopCheck:s=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:u,subscription:l,getServerState:c,stabilityCheck:f,noopCheck:h}=e();ne.useRef(!0);const d=ne.useCallback({[n.name](v){return n(v)}}[n.name],[n,f,o]),p=dF(l.addNestedSub,u.getState,c||u.getState,d,a);return ne.useDebugValue(p),p}}const Ne=Cre();function Pre(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a=0)&&(r[i]=t[i]);return r}var pF={exports:{}},pt={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Nr=typeof Symbol=="function"&&Symbol.for,iS=Nr?Symbol.for("react.element"):60103,aS=Nr?Symbol.for("react.portal"):60106,Av=Nr?Symbol.for("react.fragment"):60107,Cv=Nr?Symbol.for("react.strict_mode"):60108,Pv=Nr?Symbol.for("react.profiler"):60114,Ov=Nr?Symbol.for("react.provider"):60109,Rv=Nr?Symbol.for("react.context"):60110,oS=Nr?Symbol.for("react.async_mode"):60111,Iv=Nr?Symbol.for("react.concurrent_mode"):60111,kv=Nr?Symbol.for("react.forward_ref"):60112,Mv=Nr?Symbol.for("react.suspense"):60113,Pre=Nr?Symbol.for("react.suspense_list"):60120,Fv=Nr?Symbol.for("react.memo"):60115,Nv=Nr?Symbol.for("react.lazy"):60116,Ore=Nr?Symbol.for("react.block"):60121,Rre=Nr?Symbol.for("react.fundamental"):60117,Ire=Nr?Symbol.for("react.responder"):60118,kre=Nr?Symbol.for("react.scope"):60119;function Gn(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case iS:switch(t=t.type,t){case oS:case Iv:case Av:case Pv:case Cv:case Mv:return t;default:switch(t=t&&t.$$typeof,t){case Rv:case kv:case Nv:case Fv:case Ov:return t;default:return e}}case aS:return e}}}function pF(t){return Gn(t)===Iv}pt.AsyncMode=oS;pt.ConcurrentMode=Iv;pt.ContextConsumer=Rv;pt.ContextProvider=Ov;pt.Element=iS;pt.ForwardRef=kv;pt.Fragment=Av;pt.Lazy=Nv;pt.Memo=Fv;pt.Portal=aS;pt.Profiler=Pv;pt.StrictMode=Cv;pt.Suspense=Mv;pt.isAsyncMode=function(t){return pF(t)||Gn(t)===oS};pt.isConcurrentMode=pF;pt.isContextConsumer=function(t){return Gn(t)===Rv};pt.isContextProvider=function(t){return Gn(t)===Ov};pt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===iS};pt.isForwardRef=function(t){return Gn(t)===kv};pt.isFragment=function(t){return Gn(t)===Av};pt.isLazy=function(t){return Gn(t)===Nv};pt.isMemo=function(t){return Gn(t)===Fv};pt.isPortal=function(t){return Gn(t)===aS};pt.isProfiler=function(t){return Gn(t)===Pv};pt.isStrictMode=function(t){return Gn(t)===Cv};pt.isSuspense=function(t){return Gn(t)===Mv};pt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Av||t===Iv||t===Pv||t===Cv||t===Mv||t===Pre||typeof t=="object"&&t!==null&&(t.$$typeof===Nv||t.$$typeof===Fv||t.$$typeof===Ov||t.$$typeof===Rv||t.$$typeof===kv||t.$$typeof===Rre||t.$$typeof===Ire||t.$$typeof===kre||t.$$typeof===Ore)};pt.typeOf=Gn;dF.exports=pt;var Mre=dF.exports,vF=Mre,Fre={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Nre={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},mF={};mF[vF.ForwardRef]=Fre;mF[vF.Memo]=Nre;var gt={};/** + */var Nr=typeof Symbol=="function"&&Symbol.for,aS=Nr?Symbol.for("react.element"):60103,oS=Nr?Symbol.for("react.portal"):60106,Av=Nr?Symbol.for("react.fragment"):60107,Cv=Nr?Symbol.for("react.strict_mode"):60108,Pv=Nr?Symbol.for("react.profiler"):60114,Ov=Nr?Symbol.for("react.provider"):60109,Rv=Nr?Symbol.for("react.context"):60110,sS=Nr?Symbol.for("react.async_mode"):60111,Iv=Nr?Symbol.for("react.concurrent_mode"):60111,kv=Nr?Symbol.for("react.forward_ref"):60112,Mv=Nr?Symbol.for("react.suspense"):60113,Ore=Nr?Symbol.for("react.suspense_list"):60120,Fv=Nr?Symbol.for("react.memo"):60115,Nv=Nr?Symbol.for("react.lazy"):60116,Rre=Nr?Symbol.for("react.block"):60121,Ire=Nr?Symbol.for("react.fundamental"):60117,kre=Nr?Symbol.for("react.responder"):60118,Mre=Nr?Symbol.for("react.scope"):60119;function Gn(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case aS:switch(t=t.type,t){case sS:case Iv:case Av:case Pv:case Cv:case Mv:return t;default:switch(t=t&&t.$$typeof,t){case Rv:case kv:case Nv:case Fv:case Ov:return t;default:return e}}case oS:return e}}}function vF(t){return Gn(t)===Iv}pt.AsyncMode=sS;pt.ConcurrentMode=Iv;pt.ContextConsumer=Rv;pt.ContextProvider=Ov;pt.Element=aS;pt.ForwardRef=kv;pt.Fragment=Av;pt.Lazy=Nv;pt.Memo=Fv;pt.Portal=oS;pt.Profiler=Pv;pt.StrictMode=Cv;pt.Suspense=Mv;pt.isAsyncMode=function(t){return vF(t)||Gn(t)===sS};pt.isConcurrentMode=vF;pt.isContextConsumer=function(t){return Gn(t)===Rv};pt.isContextProvider=function(t){return Gn(t)===Ov};pt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===aS};pt.isForwardRef=function(t){return Gn(t)===kv};pt.isFragment=function(t){return Gn(t)===Av};pt.isLazy=function(t){return Gn(t)===Nv};pt.isMemo=function(t){return Gn(t)===Fv};pt.isPortal=function(t){return Gn(t)===oS};pt.isProfiler=function(t){return Gn(t)===Pv};pt.isStrictMode=function(t){return Gn(t)===Cv};pt.isSuspense=function(t){return Gn(t)===Mv};pt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Av||t===Iv||t===Pv||t===Cv||t===Mv||t===Ore||typeof t=="object"&&t!==null&&(t.$$typeof===Nv||t.$$typeof===Fv||t.$$typeof===Ov||t.$$typeof===Rv||t.$$typeof===kv||t.$$typeof===Ire||t.$$typeof===kre||t.$$typeof===Mre||t.$$typeof===Rre)};pt.typeOf=Gn;pF.exports=pt;var Fre=pF.exports,mF=Fre,Nre={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Lre={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},gF={};gF[mF.ForwardRef]=Nre;gF[mF.Memo]=Lre;var gt={};/** * @license React * react-is.production.min.js * @@ -81,54 +81,54 @@ Add a component higher in the tree to provide a loading * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var sS=Symbol.for("react.element"),lS=Symbol.for("react.portal"),Lv=Symbol.for("react.fragment"),Dv=Symbol.for("react.strict_mode"),Bv=Symbol.for("react.profiler"),jv=Symbol.for("react.provider"),Uv=Symbol.for("react.context"),Lre=Symbol.for("react.server_context"),$v=Symbol.for("react.forward_ref"),Vv=Symbol.for("react.suspense"),Gv=Symbol.for("react.suspense_list"),Xv=Symbol.for("react.memo"),zv=Symbol.for("react.lazy"),Dre=Symbol.for("react.offscreen"),gF;gF=Symbol.for("react.module.reference");function ai(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case sS:switch(t=t.type,t){case Lv:case Bv:case Dv:case Vv:case Gv:return t;default:switch(t=t&&t.$$typeof,t){case Lre:case Uv:case $v:case zv:case Xv:case jv:return t;default:return e}}case lS:return e}}}gt.ContextConsumer=Uv;gt.ContextProvider=jv;gt.Element=sS;gt.ForwardRef=$v;gt.Fragment=Lv;gt.Lazy=zv;gt.Memo=Xv;gt.Portal=lS;gt.Profiler=Bv;gt.StrictMode=Dv;gt.Suspense=Vv;gt.SuspenseList=Gv;gt.isAsyncMode=function(){return!1};gt.isConcurrentMode=function(){return!1};gt.isContextConsumer=function(t){return ai(t)===Uv};gt.isContextProvider=function(t){return ai(t)===jv};gt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===sS};gt.isForwardRef=function(t){return ai(t)===$v};gt.isFragment=function(t){return ai(t)===Lv};gt.isLazy=function(t){return ai(t)===zv};gt.isMemo=function(t){return ai(t)===Xv};gt.isPortal=function(t){return ai(t)===lS};gt.isProfiler=function(t){return ai(t)===Bv};gt.isStrictMode=function(t){return ai(t)===Dv};gt.isSuspense=function(t){return ai(t)===Vv};gt.isSuspenseList=function(t){return ai(t)===Gv};gt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Lv||t===Bv||t===Dv||t===Vv||t===Gv||t===Dre||typeof t=="object"&&t!==null&&(t.$$typeof===zv||t.$$typeof===Xv||t.$$typeof===jv||t.$$typeof===Uv||t.$$typeof===$v||t.$$typeof===gF||t.getModuleId!==void 0)};gt.typeOf=ai;function Bre(){const t=bre();let e=null,r=null;return{clear(){e=null,r=null},notify(){t(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],i=e;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0,a=r={callback:n,next:null,prev:r};return a.prev?a.prev.next=a:e=a,function(){!i||e===null||(i=!1,a.next?a.next.prev=a.prev:r=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}const _P={notify(){},get:()=>[]};function jre(t,e){let r,n=_P,i=0,a=!1;function o(v){c();const g=n.subscribe(v);let m=!1;return()=>{m||(m=!0,g(),f())}}function s(){n.notify()}function u(){p.onStateChange&&p.onStateChange()}function l(){return a}function c(){i++,r||(r=e?e.addNestedSub(u):t.subscribe(u),n=Bre())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=_P)}function h(){a||(a=!0,c())}function d(){a&&(a=!1,f())}const p={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:d,getListeners:()=>n};return p}const Ure=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$re=Ure?ne.useLayoutEffect:ne.useEffect;function yF({store:t,context:e,children:r,serverState:n,stabilityCheck:i="once",noopCheck:a="once"}){const o=ne.useMemo(()=>{const l=jre(t);return{store:t,subscription:l,getServerState:n?()=>n:void 0,stabilityCheck:i,noopCheck:a}},[t,n,i,a]),s=ne.useMemo(()=>t.getState(),[t]);$re(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==t.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,s]);const u=e||Eo;return ne.createElement(u.Provider,{value:o},r)}function _F(t=Eo){const e=t===Eo?fF:nS(t);return function(){const{store:n}=e();return n}}const Vre=_F();function Gre(t=Eo){const e=t===Eo?Vre:_F(t);return function(){return e().dispatch}}const Lr=Gre();Ere(yre.useSyncExternalStoreWithSelector);xre(XI.unstable_batchedUpdates);const _n=()=>{const t=Lr();return{playSeEnter:()=>{t(Ge({key:"uiSe",value:iF}))},playSeClick:()=>{t(Ge({key:"uiSe",value:aF}))},playSePageChange:()=>{t(Ge({key:"uiSe",value:Zte}))},playSeDialogOpen:()=>{t(Ge({key:"uiSe",value:Jte}))},playSeSwitch:()=>{t(Ge({key:"uiSe",value:Qte}))}}},uS=()=>({playSeEnter:()=>{te.dispatch(Ge({key:"uiSe",value:iF}))},playSeClick:()=>{te.dispatch(Ge({key:"uiSe",value:aF}))}}),Xre=[{reg:/\\\\/g,val:"\\"},{reg:/\\\|/g,val:"|"},{reg:/\\:/g,val:":"},{reg:/\\,/g,val:","},{reg:/\\;/g,val:";"},{reg:/\\./g,val:"."}],cS=t=>{let e=t;for(let r of Xre)e=e.replaceAll(r.reg,r.val);return e};function zre(t){return Kv.parseScssToWebgalStyleObj(t)}function wi(t){const[e,r]=ne.useState(t);return{_value:e,set:function(n){this._value=n,r(n)},get value(){return this._value},set value(n){this.set(n)}}}function Wre(t){if(t.sheet)return t.sheet;for(var e=0;e0?Gr(hu,--Pn):0,jl--,sr===10&&(jl=1,Yv--),sr}function Bn(){return sr=Pn2||Kc(sr)>3?"":" "}function ane(t,e){for(;--e&&Bn()&&!(sr<48||sr>102||sr>57&&sr<65||sr>70&&sr<97););return Xf(t,pd()+(e<6&&Ji()==32&&Bn()==32))}function l_(t){for(;Bn();)switch(sr){case t:return Pn;case 34:case 39:t!==34&&t!==39&&l_(sr);break;case 40:t===41&&l_(t);break;case 92:Bn();break}return Pn}function one(t,e){for(;Bn()&&t+sr!==47+10;)if(t+sr===42+42&&Ji()===47)break;return"/*"+Xf(e,Pn-1)+"*"+Wv(t===47?t:Bn())}function sne(t){for(;!Kc(Ji());)Bn();return Xf(t,Pn)}function lne(t){return TF(md("",null,null,null,[""],t=EF(t),0,[0],t))}function md(t,e,r,n,i,a,o,s,u){for(var l=0,c=0,f=o,h=0,d=0,p=0,v=1,g=1,m=1,y=0,_="",x=i,b=a,S=n,w=_;g;)switch(p=y,y=Bn()){case 40:if(p!=108&&Gr(w,f-1)==58){s_(w+=ot(vd(y),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:w+=vd(y);break;case 9:case 10:case 13:case 32:w+=ine(p);break;case 92:w+=ane(pd()-1,7);continue;case 47:switch(Ji()){case 42:case 47:yh(une(one(Bn(),pd()),e,r),u);break;default:w+="/"}break;case 123*v:s[l++]=Ui(w)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:m==-1&&(w=ot(w,/\f/g,"")),d>0&&Ui(w)-f&&yh(d>32?bP(w+";",n,r,f-1):bP(ot(w," ","")+";",n,r,f-2),u);break;case 59:w+=";";default:if(yh(S=xP(w,e,r,l,c,i,s,_,x=[],b=[],f),a),y===123)if(c===0)md(w,e,S,S,x,a,f,s,b);else switch(h===99&&Gr(w,3)===110?100:h){case 100:case 108:case 109:case 115:md(t,S,S,n&&yh(xP(t,S,S,0,0,i,s,_,i,x=[],f),b),i,b,f,s,n?x:b);break;default:md(w,S,S,S,[""],b,0,s,b)}}l=c=d=0,v=m=1,_=w="",f=o;break;case 58:f=1+Ui(w),d=p;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&nne()==125)continue}switch(w+=Wv(y),y*v){case 38:m=c>0?1:(w+="\f",-1);break;case 44:s[l++]=(Ui(w)-1)*m,m=1;break;case 64:Ji()===45&&(w+=vd(Bn())),h=Ji(),c=f=Ui(_=w+=sne(pd())),y++;break;case 45:p===45&&Ui(w)==2&&(v=0)}}return a}function xP(t,e,r,n,i,a,o,s,u,l,c){for(var f=i-1,h=i===0?a:[""],d=dS(h),p=0,v=0,g=0;p0?h[m]+" "+y:ot(y,/&\f/g,h[m])))&&(u[g++]=_);return Hv(t,e,r,i===0?fS:s,u,l,c)}function une(t,e,r){return Hv(t,e,r,xF,Wv(rne()),qc(t,2,-2),0)}function bP(t,e,r,n){return Hv(t,e,r,hS,qc(t,0,n),qc(t,n+1,-1),n)}function El(t,e){for(var r="",n=dS(t),i=0;i6)switch(Gr(t,e+1)){case 109:if(Gr(t,e+4)!==45)break;case 102:return ot(t,/(.+:)(.+)-([^]+)/,"$1"+at+"$2-$3$1"+up+(Gr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~s_(t,"stretch")?AF(ot(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Gr(t,e+1)!==115)break;case 6444:switch(Gr(t,Ui(t)-3-(~s_(t,"!important")&&10))){case 107:return ot(t,":",":"+at)+t;case 101:return ot(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+at+(Gr(t,14)===45?"inline-":"")+"box$3$1"+at+"$2$3$1"+Yr+"$2box$3")+t}break;case 5936:switch(Gr(t,e+11)){case 114:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return at+t+Yr+ot(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return at+t+Yr+t+t}return t}var _ne=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case hS:e.return=AF(e.value,e.length);break;case bF:return El([Uu(e,{value:ot(e.value,"@","@"+at)})],i);case fS:if(e.length)return tne(e.props,function(a){switch(ene(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return El([Uu(e,{props:[ot(a,/:(read-\w+)/,":"+up+"$1")]})],i);case"::placeholder":return El([Uu(e,{props:[ot(a,/:(plac\w+)/,":"+at+"input-$1")]}),Uu(e,{props:[ot(a,/:(plac\w+)/,":"+up+"$1")]}),Uu(e,{props:[ot(a,/:(plac\w+)/,Yr+"input-$1")]})],i)}return""})}},xne=[_ne],bne=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var g=v.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=e.stylisPlugins||xne,a={},o,s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var g=v.getAttribute("data-emotion").split(" "),m=1;m=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var wne={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ene=/[A-Z]|^ms/g,Tne=/_EMO_([^_]+?)_([^]*?)_EMO_/g,CF=function(e){return e.charCodeAt(1)===45},wP=function(e){return e!=null&&typeof e!="boolean"},Yg=dne(function(t){return CF(t)?t:t.replace(Ene,"-$&").toLowerCase()}),EP=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Tne,function(n,i,a){return $i={name:i,styles:a,next:$i},i})}return wne[e]!==1&&!CF(e)&&typeof r=="number"&&r!==0?r+"px":r};function Zc(t,e,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return $i={name:r.name,styles:r.styles,next:$i},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)$i={name:n.name,styles:n.styles,next:$i},n=n.next;var i=r.styles+";";return i}return Ane(t,e,r)}case"function":{if(t!==void 0){var a=$i,o=r(t);return $i=a,Zc(t,e,o)}break}}if(e==null)return r;var s=e[r];return s!==void 0?s:r}function Ane(t,e,r){var n="";if(Array.isArray(r))for(var i=0;ia.stage.replacedUIlable),n=(a,o)=>{var u;const s=(r==null?void 0:r[a])??a;if(Object.keys(e.value.classNameStyles).includes(s)){const l=ac(((u=e.value.classNameStyles)==null?void 0:u[s])??"");return`${o} ${l}`}return o},i=async()=>{ge.debug("更新 Scss 文件",t);const o=(await Wc.get(`game/template/${t}`)).data;e.set(zre(o))};return ne.useEffect(()=>{i()},[]),ne.useEffect(()=>{kne(e.value.others)},[e.value.others]),Mne(i),n}function Mne(t){const e=()=>{t()};ne.useEffect(()=>(L.events.styleUpdate.on(e),()=>L.events.styleUpdate.off(e)),[])}class vS{constructor(e,r){Ae(this,"text");Ae(this,"jump");Ae(this,"jumpToScene");Ae(this,"showCondition");Ae(this,"enableCondition");this.text=cS(e),this.jump=r,this.jumpToScene=r.match(new RegExp("(?"),n=r.length>1?r[0]:null,a=(r.length>1?r[1]:r[0]).split(new RegExp("(?{const r=t.content.split(new RegExp("(?vS.parse(n));return ea.render(C.jsx(yF,{store:te,children:C.jsx(Nne,{chooseOptions:r})}),document.getElementById("chooseContainer")),{performName:"choose",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{ea.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}};function Nne(t){const r=te.getState().userData.optionData.textboxFont===Zi.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:n,playSeClick:i}=uS(),a=pS("Stage/Choose/choose.scss"),o=s=>s.filter((u,l)=>d_(u.showCondition)).map((u,l)=>{const c=d_(u.enableCondition),f=c?a("Choose_item",gh.Choose_item):a("Choose_item_disabled",gh.Choose_item_disabled),h=c?()=>{i(),u.jumpToScene?rF(u.jump,u.text):nF(u.jump),L.gameplay.performController.unmountPerform("choose")}:()=>{};return C.jsx("div",{className:a("Choose_item_outer",gh.Choose_item_outer),children:C.jsx("div",{className:f,style:{fontFamily:r},onClick:h,onMouseEnter:n,children:u.text})},u.jump+l)});return C.jsx("div",{className:a("Choose_Main",gh.Choose_Main),children:o(t.chooseOptions)})}const Lne=t=>(ge.debug(`脚本内注释${t.content}`),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Dne=t=>(t.content!==""&&t.content!=="none"?te.dispatch(Ge({key:"enableFilm",value:t.content})):te.dispatch(Ge({key:"enableFilm",value:""})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Bne="_Choose_Main_4xkm5_1",jne="_Choose_item_4xkm5_13",Une="_glabalDialog_container_inner_4xkm5_28",$ne="_glabalDialog_container_4xkm5_28",Vne="_title_4xkm5_47",Gne="_button_4xkm5_59",Vs={Choose_Main:Bne,Choose_item:jne,glabalDialog_container_inner:Une,glabalDialog_container:$ne,title:Vne,button:Gne},Xne=t=>{const e=t.content.toString().trim(),r=He(t,"title"),n=(r===0?"Please Input":r)??"Please Input",i=He(t,"buttonText"),a=(i===0?"OK":i)??"OK",s=te.getState().userData.optionData.textboxFont===Zi.song?'"思源宋体", serif':'"WebgalUI", serif',{playSeEnter:u,playSeClick:l}=uS(),c=C.jsx("div",{style:{fontFamily:s},className:Vs.glabalDialog_container,children:C.jsxs("div",{className:Vs.glabalDialog_container_inner,children:[C.jsx("div",{className:Vs.title,children:n}),C.jsx("input",{id:"user-input",className:Vs.Choose_item}),C.jsx("div",{onMouseEnter:u,onClick:()=>{const f=document.getElementById("user-input");f&&te.dispatch(Pk({key:e,value:((f==null?void 0:f.value)??"")===""?" ":(f==null?void 0:f.value)??""})),l(),L.gameplay.performController.unmountPerform("userInput"),tn()},className:Vs.button,children:a})]})});return ea.render(C.jsx("div",{className:Vs.Choose_Main,children:c}),document.getElementById("chooseContainer")),{performName:"userInput",duration:1e3*60*60*24,isHoldOn:!1,stopFunction:()=>{ea.render(C.jsx("div",{}),document.getElementById("chooseContainer"))},blockingNext:()=>!0,blockingAuto:()=>!0,stopTimeout:void 0}},zne="_FullScreenPerform_main_7er8a_2",Wne="_FullScreenPerform_element_7er8a_9",Yne="_fullScreen_video_7er8a_17",Hne="_fadeIn_7er8a_74",qne="_intro_showSoftly_7er8a_1",Kne="_slideIn_7er8a_80",Zne="_typingEffect_7er8a_86",Qne="_typing_7er8a_86",Jne="_blinkCursor_7er8a_1",eie="_pixelateEffect_7er8a_95",tie="_pixelateAnimation_7er8a_1",rie="_revealAnimation_7er8a_101",nie="_videoContainer_7er8a_115",Bi={FullScreenPerform_main:zne,FullScreenPerform_element:Wne,fullScreen_video:Yne,fadeIn:Hne,intro_showSoftly:qne,slideIn:Kne,typingEffect:Zne,typing:Qne,blinkCursor:Jne,pixelateEffect:eie,pixelateAnimation:tie,revealAnimation:rie,videoContainer:nie},iie=t=>{const e=`introPerform${Math.random().toString()}`;let r,n="rgba(0, 0, 0, 1)",i="rgba(255, 255, 255, 1)";const a=(b,S=0)=>{switch(b){case"fadeIn":return Bi.fadeIn;case"slideIn":return Bi.slideIn;case"typingEffect":return`${Bi.typingEffect} ${S}`;case"pixelateEffect":return Bi.pixelateEffect;case"revealAnimation":return Bi.revealAnimation;default:return Bi.fadeIn}};let o=Bi.fadeIn,s=1500,u=!1;for(const b of t.args){if(b.key==="backgroundColor"&&(n=b.value||"rgba(0, 0, 0, 1)"),b.key==="fontColor"&&(i=b.value||"rgba(255, 255, 255, 1)"),b.key==="fontSize")switch(b.value){case"small":r="280%";break;case"medium":r="350%";break;case"large":r="420%";break}if(b.key==="animation"&&(o=a(b.value)),b.key==="delayTime"){const S=parseInt(b.value.toString(),10);s=isNaN(S)?s:S}b.key==="hold"&&b.value===!0&&(u=!0)}const l={background:n,color:i,fontSize:r||"350%",width:"100%",height:"100%"},c=t.content.split(new RegExp("(?cS(b));let h=1e3+s*c.length;const d=u?1e3*60*60*24:1e3+s*c.length;let p=!0,v=setTimeout(()=>{p=!1},h),g=setTimeout(()=>{});const m=()=>{const b=document.getElementById("introContainer");if(h-=s,clearTimeout(v),v=setTimeout(()=>{p=!1},h),b){const S=b.childNodes[0].childNodes[0].childNodes,w=S.length;S.forEach((E,T)=>{const A=Number(E.style.animationDelay.split("ms")[0]);A>0&&(E.style.animationDelay=`${A-s}ms`),T===w-1&&(A===0?(clearTimeout(g),L.gameplay.performController.unmountPerform(e)):(clearTimeout(g),u||(g=setTimeout(()=>{L.gameplay.performController.unmountPerform(e)},h))))})}};L.events.userInteractNext.on(m);const y=c.map((b,S)=>C.jsxs("div",{style:{animationDelay:`${s*S}ms`},className:o,children:[b,b===""?" ":""]},"introtext"+S+Math.random().toString())),_=C.jsx("div",{style:l,children:C.jsx("div",{style:{padding:"3em 4em 3em 4em"},children:y})});ea.render(_,document.getElementById("introContainer"));const x=document.getElementById("introContainer");return x&&(x.style.display="block"),{performName:e,duration:d,isHoldOn:!1,stopFunction:()=>{const b=document.getElementById("introContainer");b&&(b.style.display="none"),L.events.userInteractNext.off(m)},blockingNext:()=>p,blockingAuto:()=>p,stopTimeout:void 0,goNextWhenOver:!0}},aie=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),oie=t=>{let e=t.content;return(t.content==="none"||t.content==="")&&(e=""),te.dispatch(Ge({key:"miniAvatar",value:e})),{performName:"none",duration:0,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},sie="modulepreload",lie=function(t,e){return new URL(t,e).href},PP={},uie=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=lie(a,n),a in PP)return;PP[a]=!0;const o=a.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(!!n)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===a&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":sie,o||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),o)return new Promise((c,f)=>{l.addEventListener("load",c),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},RF=new Map;function cie(t){return t?typeof t=="string"?t:t():null}function IF(t){const e=cie(t);return e||(ge.error("Get name of perform failed. There no name of the perform."),"")}function _we(t,e){if(!e||typeof e!="function")throw new Error(`"${t}" is not a callback.`);RF.set(IF(t),e)}function fie(t,e=[]){const r=RF.get(IF(t));if(!r||!(r instanceof Function))throw ge.error(`Can't call the perform named "${t}"`),new Error(`"${t}" don't have the pixiPerform callback.`);return r(...e)}uie(()=>import("./initRegister-8a9071ee.js"),[],import.meta.url);const hie=t=>{const e="PixiPerform"+t.content;L.gameplay.performController.performList.forEach(a=>{if(a.performName===e)return{performName:"none",duration:0,isOver:!1,isHoldOn:!0,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}});const r=fie(t.content),{container:n,tickerKey:i}=r;return{performName:e,duration:0,isHoldOn:!0,stopFunction:()=>{var a,o;ge.warn("现在正在卸载pixi演出"),n.destroy({texture:!0,baseTexture:!0}),(a=L.gameplay.pixiStage)==null||a.effectsContainer.removeChild(n),(o=L.gameplay.pixiStage)==null||o.removeAnimation(i)},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},die=t=>{var a;ge.debug("play SE");let e="effect-sound";L.gameplay.performController.unmountPerform(e,!0);let r=t.content,n=!1;He(t,"id")&&(e=`effect-sound-${((a=He(t,"id"))==null?void 0:a.toString())??""}`,L.gameplay.performController.unmountPerform(e,!0),n=!0);let i=!1;return{performName:"none",blockingAuto(){return!1},blockingNext(){return!1},isHoldOn:!1,stopFunction(){},stopTimeout:void 0,duration:1e3*60*60,arrangePerformPromise:new Promise(o=>{setTimeout(()=>{var p;const s=He(t,"volume");let u=document.createElement("audio");u.src=r,n&&(u.loop=!0);const l=te.getState().userData,c=l.optionData.volumeMain,f=typeof s=="number"&&s>=0&&s<=100?s:100,h=c*.01*(((p=l.optionData)==null?void 0:p.seVolume)??100)*.01*f*.01;u.volume=h,u.currentTime=0;const d={performName:e,duration:1e3*60*60,isHoldOn:n,skipNextCollect:!0,stopFunction:()=>{u.pause(),u.remove()},blockingNext:()=>!1,blockingAuto:()=>n?!1:!i,stopTimeout:void 0};o(d),u==null||u.play(),u.onended=()=>{for(const v of L.gameplay.performController.performList)v.performName===e&&(i=!0,v.stopFunction(),L.gameplay.performController.unmountPerform(v.performName))}},1)})}},pie=t=>{const e=te.getState().userData,r=e.optionData.volumeMain,n=r*.01*e.optionData.vocalVolume*.01,i=r*.01*e.optionData.bgmVolume*.01,a=TS();let o=He(t,"skipOff"),s=!1;o&&(s=!0),ea.render(C.jsx("div",{className:Bi.videoContainer,children:C.jsx("video",{className:Bi.fullScreen_video,id:"playVideoElement",src:t.content,autoPlay:!0})}),document.getElementById("videoContainer"));let u=!1;return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>s,blockingAuto:()=>!0,stopTimeout:void 0,arrangePerformPromise:new Promise(l=>{setTimeout(()=>{let c=document.getElementById("playVideoElement");if(c!==null){c.currentTime=0,c.volume=i;const f=()=>{for(const y of L.gameplay.performController.performList)y.performName===a&&(u=!0,y.stopFunction(),L.gameplay.performController.unmountPerform(y.performName))},h=()=>{f()};L.events.fullscreenDbClick.on(h);const d={performName:a,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{L.events.fullscreenDbClick.off(h);const y=document.getElementById("currentBgm");y&&(y.volume=i.toString());const _=document.getElementById("currentVocal");y&&(_.volume=n.toString()),ea.render(C.jsx("div",{}),document.getElementById("videoContainer"))},blockingNext:()=>s,blockingAuto:()=>!u,stopTimeout:void 0,goNextWhenOver:!0};l(d);const p=0,v=0,g=document.getElementById("currentBgm");g&&(g.volume=v.toString());const m=document.getElementById("currentVocal");g&&(m.volume=p.toString()),c==null||c.play(),c.onended=()=>{f()}}},1)})}},vie=t=>{var o;te.getState().stage.currentDialogKey;const e=t.content,r=En(e),n=(((o=He(t,"target"))==null?void 0:o.toString())??"default_id").toString(),i=`${n}-${e}-${r}`;let a;return setTimeout(()=>{var u,l;(u=L.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n);const s=lp(e,n,r);s&&(ge.debug(`动画${e}作用在${n}`,r),(l=L.gameplay.pixiStage)==null||l.registerAnimation(s,i,n))},0),a=()=>{setTimeout(()=>{var s;te.getState().stage.currentDialogKey,(s=L.gameplay.pixiStage)==null||s.removeAnimationWithSetEffects(i)},0)},{performName:i,duration:r,isHoldOn:!1,stopFunction:a,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function mie(t,e){const r=L.gameplay.pixiStage.getStageObjByKey(t);function n(){r&&(r.pixiContainer.alpha=0,r.pixiContainer.blur=0)}function i(){r&&(r.pixiContainer.alpha=1,r.pixiContainer.blur=5)}function a(o){if(r){const s=r.pixiContainer,u=L.gameplay.pixiStage.frameDuration,l=e/u*o,c=1/l,f=5/l;s.alpha<1&&(s.alpha+=c),s.blur<5&&(s.blur+=f)}}return{setStartState:n,setEndState:i,tickerFunc:a}}const gie=[{name:"universalSoftIn",animationGenerateFunc:SM},{name:"universalSoftOff",animationGenerateFunc:wM},{name:"testblur",animationGenerateFunc:mie}],yie=t=>{var s,u,l;te.getState().stage.currentDialogKey;const e=t.content,r=He(t,"duration")??0,n=((s=He(t,"target"))==null?void 0:s.toString())??"0",i=`${n}-${e}-${r}`,a=_ie(e);let o=()=>{};if(a){ge.debug(`动画${e}作用在${n}`,r);const c=a(n,r);(u=L.gameplay.pixiStage)==null||u.stopPresetAnimationOnTarget(n),(l=L.gameplay.pixiStage)==null||l.registerAnimation(c,i,n),o=()=>{var f;te.getState().stage.currentDialogKey,(f=L.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(i)}}return{performName:i,duration:r,isHoldOn:!1,stopFunction:o,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function _ie(t){const e=gie.find(r=>r.name===t);return ge.debug("装载动画",e),e?e.animationGenerateFunc:null}const xie=t=>({performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),bie=t=>{var l;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;try{n=JSON.parse(r)}catch{n=[]}const i={name:e,effects:n};L.animationManager.addAnimation(i);const a=En(e),o=((l=He(t,"target"))==null?void 0:l.toString())??"0",s=`${o}-${e}-${a}`;let u=()=>{};return setTimeout(()=>{var f,h;(f=L.gameplay.pixiStage)==null||f.stopPresetAnimationOnTarget(o);const c=lp(e,o,a);c&&(ge.debug(`动画${e}作用在${o}`,a),(h=L.gameplay.pixiStage)==null||h.registerAnimation(c,s,o))},0),u=()=>{setTimeout(()=>{var c;te.getState().stage.currentDialogKey,(c=L.gameplay.pixiStage)==null||c.removeAnimationWithSetEffects(s)},0)},{performName:s,duration:a,isHoldOn:!1,stopFunction:u,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Sie(t){return t.content==="hide"?te.dispatch(Ge({key:"isDisableTextbox",value:!0})):te.dispatch(Ge({key:"isDisableTextbox",value:!1})),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}}const wie=t=>{var c;te.getState().stage.currentDialogKey;const e=(Math.random()*10).toString(16),r=t.content;let n;const i=He(t,"duration"),a=((c=He(t,"target"))==null?void 0:c.toString())??"0";try{const f=JSON.parse(r);n=Yc(a,f,i)}catch{n=[]}const o={name:e,effects:n};L.animationManager.addAnimation(o);const s=Tie(e),u=`${a}-${e}-${s}`;let l=()=>{};return setTimeout(()=>{var h,d;(h=L.gameplay.pixiStage)==null||h.stopPresetAnimationOnTarget(a);const f=Eie(e,a,s);f&&(ge.debug(`动画${e}作用在${a}`,s),(d=L.gameplay.pixiStage)==null||d.registerAnimation(f,u,a))},0),l=()=>{setTimeout(()=>{var f;te.getState().stage.currentDialogKey,(f=L.gameplay.pixiStage)==null||f.removeAnimationWithSetEffects(u)},0)},{performName:u,duration:s,isHoldOn:!1,stopFunction:l,blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function Eie(t,e,r){const n=L.animationManager.getAnimations().find(i=>i.name===t);if(n){const i=n.effects.map(a=>{const o=Jt({...Kb,duration:0});return Object.assign(o,a),o.duration=a.duration,o});return ge.debug("装载自定义动画",i),tF(i,e,r)}return null}function Tie(t){const e=L.animationManager.getAnimations().find(r=>r.name===t);if(e){let r=0;return e.effects.forEach(n=>{r+=n.duration}),r}return 0}const Aie=t=>{let e="0";for(const r of t.args)r.key==="target"&&(e=r.value.toString());return He(t,"enter")&&L.animationManager.nextEnterAnimationName.set(e,He(t,"enter").toString()),He(t,"exit")&&L.animationManager.nextExitAnimationName.set(e+"-off",He(t,"exit").toString()),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!1,stopTimeout:void 0}},Cie=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),ge.info(`解锁BGM:${r},路径:${e},所属系列:${n}`),te.dispatch(Wk({name:r,url:e,series:n}));const i=te.getState().userData;return Os.setItem(L.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},Pie=t=>{const e=t.content;let r=t.content,n="default";t.args.forEach(a=>{a.key==="name"&&(r=a.value.toString()),a.key==="series"&&(n=a.value.toString())}),ge.info(`解锁CG:${r},路径:${e},所属系列:${n}`),te.dispatch(zk({name:r,url:e,series:n}));const i=te.getState().userData;return Os.setItem(L.gameKey,i).then(()=>{}),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},mS=(t,e=!0)=>{t&&L.backlogManager.makeBacklogEmpty(),e&&L.sceneManager.resetScene(),L.gameplay.performController.removeAllPerform(),L.gameplay.resetGamePlay();const r=Jt(Ck),n=te.getState().stage.GameVar;te.dispatch(ov(r)),e||te.dispatch(Ge({key:"GameVar",value:n}))},Oie={saveData:[],quickSaveData:null},kF=Qp({name:"saveData",initialState:Jt(Oie),reducers:{setFastSave:(t,e)=>{t.quickSaveData=e.payload},resetFastSave:t=>{t.quickSaveData=null},resetSaves:t=>{t.quickSaveData=null,t.saveData=[]},saveGame:(t,e)=>{t.saveData[e.payload.index]=e.payload.saveData},replaceSaveGame:(t,e)=>{t.saveData=e.payload}}}),Oa=kF.actions,Rie=kF.reducer,Iie=t=>{mS(!0);const e=te.dispatch,r=Nn("start.txt",Fn.scene);return setTimeout(()=>{L.sceneManager.resetScene()},5),e(Oa.resetFastSave()),hp(),ua(r).then(n=>{L.sceneManager.sceneData.currentScene=ca(n,"start.txt",r)}),e(rt({component:"showTitle",visibility:!0})),AS(te.getState().GUI.titleBgm),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},kie=t=>(nF(t.content),{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),Mie=t=>(L.gameplay.performController.performList.forEach(e=>{if(e.performName.match(/PixiPerform/)){ge.warn("pixi 被脚本重新初始化",e.performName);for(let r=0;r{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}),ut={audioContext:new AudioContext,source:null,analyser:void 0,dataArray:void 0,audioLevelInterval:setInterval(()=>{},0),blinkTimerID:setTimeout(()=>{},0),maxAudioLevel:0},Fie=t=>(ut.maxAudioLevel=Math.max(t,ut.maxAudioLevel),{OPEN_THRESHOLD:ut.maxAudioLevel*.75,HALF_OPEN_THRESHOLD:ut.maxAudioLevel*.5}),Nie=t=>{let e=!1;function r(){var n;e||t.animationEndTime&&Date.now()>t.animationEndTime||(e=!0,(n=L.gameplay.pixiStage)==null||n.performBlinkAnimation(t.key,t.animationItem,"closed",t.pos),ut.blinkTimerID=setTimeout(()=>{var a;(a=L.gameplay.pixiStage)==null||a.performBlinkAnimation(t.key,t.animationItem,"open",t.pos),e=!1;const i=Math.random()*300+3500;ut.blinkTimerID=setTimeout(r,i)},200))}r()},Lie=(t,e,r)=>{t.getByteFrequencyData(e);let n=0;for(let i=0;i{var h,d;const{audioLevel:e,OPEN_THRESHOLD:r,HALF_OPEN_THRESHOLD:n,currentMouthValue:i,lerpSpeed:a,key:o,animationItem:s,pos:u}=t;let l;e>r?l=1:e>n?l=.5:l=0;const c=i+(l-i)*a;(h=L.gameplay.pixiStage)==null||h.setModelMouthY(o,e);let f;c>.75?f="open":c>.25?f="half_open":f="closed",s!==void 0&&((d=L.gameplay.pixiStage)==null||d.performMouthSyncAnimation(o,s,f,u))};class Die{constructor(e){Ae(this,"subject");Ae(this,"result");Ae(this,"isEnd",!1);this.subject=e}with(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this}endsWith(e,r){return!this.isEnd&&this.subject===e&&(this.result=r(),this.isEnd=!0),this.evaluate()}default(e){return this.isEnd||(this.result=e()),this.evaluate()}evaluate(){return this.result}}function zf(t){return new Die(t)}const Bie=t=>{ge.debug("play vocal");const e="vocal-play",r=He(t,"vocal"),n=He(t,"volume");let i;i=te.getState().stage;let a="",o="";const s=i.freeFigure,u=i.figureAssociatedAnimation;let l=0,c=0;const f=1;let h=document.getElementById("currentVocal");L.gameplay.performController.unmountPerform("vocal-play",!0),h!==null&&(h.currentTime=0,h.pause());for(const p of t.args)p.value===!0&&zf(p.key).with("left",()=>{a="left"}).with("right",()=>{a="right"}).endsWith("center",()=>{a="center"}),p.key==="figureId"&&(o=`${p.value.toString()}`);te.dispatch(Ge({key:"playVocal",value:r})),te.dispatch(Ge({key:"vocal",value:r}));let d=!1;return{arrangePerformPromise:new Promise(p=>{setTimeout(()=>{let v=document.getElementById("currentVocal");if(typeof n=="number"&&n>=0&&n<=100?te.dispatch(Ge({key:"vocalVolume",value:n})):te.dispatch(Ge({key:"vocalVolume",value:100})),v!==null){v.currentTime=0;const g={performName:e,duration:1e3*60*60,isOver:!1,isHoldOn:!1,stopFunction:()=>{clearInterval(ut.audioLevelInterval),v.pause(),o=o||`fig-${a}`;const y=u.find(_=>_.targetId===o);u_({audioLevel:0,OPEN_THRESHOLD:1,HALF_OPEN_THRESHOLD:1,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:y,pos:a}),clearTimeout(ut.blinkTimerID)},blockingNext:()=>!1,blockingAuto:()=>!d,skipNextCollect:!0,stopTimeout:void 0};L.gameplay.performController.arrangeNewPerform(g,t,!1),o=o||`fig-${a}`;const m=u.find(y=>y.targetId===o);if(m){const y=s.find(b=>b.key===o);if(y&&(a=y.basePosition),!ut.audioContext){let b;b=new AudioContext,ut.analyser=b.createAnalyser(),ut.analyser.fftSize=256,ut.dataArray=new Uint8Array(ut.analyser.frequencyBinCount)}ut.analyser||(ut.analyser=ut.audioContext.createAnalyser(),ut.analyser.fftSize=256),l=ut.analyser.frequencyBinCount,ut.dataArray=new Uint8Array(l);let _=document.getElementById("currentVocal");ut.source||(ut.source=ut.audioContext.createMediaElementSource(_),ut.source.connect(ut.analyser)),ut.analyser.connect(ut.audioContext.destination),ut.audioLevelInterval=setInterval(()=>{const b=Lie(ut.analyser,ut.dataArray,l),{OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w}=Fie(b);u_({audioLevel:b,OPEN_THRESHOLD:S,HALF_OPEN_THRESHOLD:w,currentMouthValue:c,lerpSpeed:f,key:o,animationItem:m,pos:a})},50);let x;x=Date.now()+1e4,Nie({key:o,animationItem:m,pos:a,animationEndTime:x}),setTimeout(()=>{clearTimeout(ut.blinkTimerID)},1e4)}v==null||v.play(),v.onended=()=>{for(const y of L.gameplay.performController.performList)y.performName===e&&(d=!0,y.stopFunction(),L.gameplay.performController.unmountPerform(y.performName))}}},1)})}};function gS(t){switch(t){case hn.slow:return 80;case hn.normal:return 35;case hn.fast:return 3}}function MF(t){switch(t){case hn.slow:return 800;case hn.normal:return 350;case hn.fast:return 200}}function FF(){const t=Ne(r=>r.userData.optionData.textboxFont);function e(){return zf(t).with(Zi.song,()=>'"思源宋体", serif').with(Zi.lxgw,()=>'"LXGW", serif').with(Zi.hei,()=>'"WebgalUI", serif').default(()=>'"WebgalUI", serif')}return e()}function c_(t){switch(t){case 0:return 155;case 1:return 205;case 2:return 230;default:return 205}}const jie="_TextBox_EventHandler_1jt23_2",Uie="_TextBox_Container_1jt23_10",$ie="_showSoftly_1jt23_1",Vie="_TextBox_main_1jt23_18",Gie="_TextBox_main_miniavatarOff_1jt23_39",Xie="_TextBox_Background_1jt23_43",zie="_TextBox_textElement_start_1jt23_56",Wie="_TextDelayShow_1jt23_1",Yie="_outer_1jt23_64",Hie="_inner_1jt23_78",qie="_zhanwei_1jt23_89",Kie="_TextBox_textElement_Settled_1jt23_97",Zie="_TextBox_showName_1jt23_104",Qie="_TextBox_ShowName_Background_1jt23_117",Jie="_miniAvatarContainer_1jt23_132",eae="_miniAvatarImg_1jt23_142",tae="_nameContainer_1jt23_150",rae="_outerName_1jt23_156",nae="_innerName_1jt23_167",iae="_text_1jt23_174",yt={TextBox_EventHandler:jie,TextBox_Container:Uie,showSoftly:$ie,TextBox_main:Vie,TextBox_main_miniavatarOff:Gie,TextBox_Background:Xie,TextBox_textElement_start:zie,TextDelayShow:Wie,outer:Yie,inner:Hie,zhanwei:qie,TextBox_textElement_Settled:Kie,TextBox_showName:Zie,TextBox_ShowName_Background:Qie,miniAvatarContainer:Jie,miniAvatarImg:eae,nameContainer:tae,outerName:rae,innerName:nae,text:iae};function NF(t){const{textArray:e,textDelay:r,currentConcatDialogPrev:n,currentDialogKey:i,isText:a,isSafari:o,isFirefox:s,fontSize:u,miniAvatar:l,isHasName:c,showName:f,font:h,textDuration:d,isUseStroke:p,textboxOpacity:v,textSizeState:g}=t,m=pS("Stage/TextBox/textbox.scss");ne.useEffect(()=>{function b(){[...document.querySelectorAll(".Textelement_start")].forEach(E=>{E.className=m("TextBox_textElement_Settled",yt.TextBox_textElement_Settled)})}return L.events.textSettle.on(b),()=>{L.events.textSettle.off(b)}},[]);let y=0;const _=f.map((b,S)=>{const w=b.map((E,T)=>{const A=E.reactNode;let O="",P="",k=!1;if(E.enhancedValue){k=!0;const j=E.enhancedValue;for(const z of j){const{key:J,value:Z}=z;switch(J){case"style":O=Z;break;case"tips":break;case"style-alltext":P=Z;break}}}const M=" "+ac(O,{label:"showname"}),B=" "+ac(P,{label:"showname"});return k?C.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:yt.zhanwei+B,children:[A,C.jsx("span",{className:m("outerName",yt.outerName)+M+B,children:A}),p&&C.jsx("span",{className:m("innerName",yt.innerName)+B,children:A})]})},T):C.jsx("span",{style:{position:"relative"},children:C.jsxs("span",{className:yt.zhanwei+B,children:[A,C.jsx("span",{className:m("outerName",yt.outerName)+M+B,children:A}),p&&C.jsx("span",{className:m("innerName",yt.innerName)+B,children:A})]})},T)});return C.jsx("div",{style:{wordBreak:o||t.isFirefox?"break-all":void 0,display:o?"flex":void 0,flexWrap:o?"wrap":void 0},children:w},`text-line-${S}`)}),x=e.map((b,S)=>{const w=b.map((E,T)=>{const A=E.reactNode;let O="",P="";if(E.enhancedValue){const z=E.enhancedValue;for(const J of z){const{key:Z,value:$}=J;switch(Z){case"style":O=$;break;case"tips":break;case"style-alltext":P=$;break}}}let k=y*r;y++;let M=n.length;n!==""&&y>=M&&(k=k-M*r);const B=" "+ac(O),j=" "+ac(P);return y{const[t,e]=ne.useState(!0);ne.useEffect(()=>{const _=()=>{const x=cp.height,b=cp.width,S=window.innerHeight,w=window.innerWidth,E=S/x,T=w/b,A=w/x,O=S/b;[E,T,A,O].forEach(P=>{P<=.2?e(!1):e(!0)})};return window.addEventListener("resize",_),_(),()=>{window.removeEventListener("resize",_)}},[]);const r=Ne(_=>_.stage),n=Ne(_=>_.userData),i=gS(n.optionData.textSpeed),a=MF(n.optionData.textSpeed);let o=c_(n.optionData.textSize)+"%";const s=FF(),u=r.showText!==""||r.showName!=="";let l=n.optionData.textSize;u&&r.showTextSize!==-1&&(o=c_(r.showTextSize)+"%",l=r.showTextSize);const c=zf(l).with(ti.small,()=>3).with(ti.medium,()=>2).with(ti.large,()=>2).default(()=>2),f=gs(r.showText,c),h=r.showName!=="",d=gs(r.showName,c),p=r.currentConcatDialogPrev,v=r.currentDialogKey,g=r.miniAvatar,m=n.optionData.textboxOpacity,y=NF;return C.jsx(y,{textArray:f,isText:u,textDelay:i,showName:d,isHasName:h,currentConcatDialogPrev:p,fontSize:o,currentDialogKey:v,isSafari:oae,isFirefox:aae,miniAvatar:g,textDuration:a,font:s,textSizeState:l,lineLimit:c,isUseStroke:t,textboxOpacity:m})};function OP(t){return!!t.match(/[\u4e00-\u9fa5]|[\u0800-\u4e00]|[\uac00-\ud7ff]/)}function gs(t,e,r){return t.split(new RegExp("(?cS(o)).map(o=>uae(o)).map(o=>{const s=[];return o.forEach((u,l)=>{zf(u.type).with("SegmentType.String",()=>{const c=lae(u.value);s.push(...c.map(f=>({reactNode:f})))}).endsWith("SegmentType.Link",()=>{const c=u.value,f=C.jsx("span",{className:"__enhanced_text",children:C.jsxs("ruby",{children:[c.text,C.jsx("rt",{children:c.ruby})]},l+c.text)},c.text+`${l}`);s.push({reactNode:f,enhancedValue:c.values})})}),s}).slice(0,r?void 0:e)}function lae(t){if(!t)return[""];const e=[];let r="",n=OP(t[0]);const i=a=>/[!-\/:-@\[-`{-~\u2000-\u206F\u3000-\u303F\uff00-\uffef]/g.test(a);for(const a of t)if(a===" ")r&&(e.push(r),r=""),e.push(" "),n=!1;else if(OP(a)&&!i(a))!n&&r&&(e.push(r),r=""),e.push(a),n=!0;else{if(i(a)){r?(r+=a,e.push(r),r=""):e.length>0?e[e.length-1]+=a:e.push(a);continue}n&&r&&(e.push(r),r=""),r+=a,n=!1}return r&&e.push(r),e}function uae(t){const e=/(\[(.*?)\]\((.*?)\))|([^\[\]]+)/g,r=[];let n;for(;(n=e.exec(t))!==null;)if(n[1]){const i=n[2],a=n[3];let o=[],s="";if(a.match(/style=|tips=|ruby=|style-alltext=/)){o=cae(a);const u=o.find(l=>l.key==="ruby");u&&(s=u.value)}else s=a;r.push({type:"SegmentType.Link",value:{text:i,ruby:s,values:o}})}else{const i=n[0];r.push({type:"SegmentType.String",value:i})}return r.unshift({type:"SegmentType.String",value:""}),r}function cae(t){const e=[],r=/(\S+)=(.*?)(?=\s+\S+=|\s*$)/g;let n;for(;(n=r.exec(t))!==null;)e.push({key:n[1],value:n[2].replace(/~/g,":").trim()});return e}const fae=t=>{const e=te.getState().stage,r=te.getState().userData,n=te.dispatch;let i=Math.random().toString(),a=t.content;a&&(a=String(a).replace(/ /g," "));const o=He(t,"concat"),s=He(t,"notend"),u=He(t,"speaker"),l=He(t,"clear"),c=He(t,"vocal");o?(i=e.currentDialogKey,a=e.showText+a,n(Ge({key:"currentConcatDialogPrev",value:e.showText}))):n(Ge({key:"currentConcatDialogPrev",value:""})),n(Ge({key:"showText",value:a})),n(Ge({key:"vocal",value:""})),r.optionData.voiceInterruption===zc.no&&c===null||(n(Ge({key:"playVocal",value:""})),L.gameplay.performController.unmountPerform("vocal-play",!0)),n(Ge({key:"currentDialogKey",value:i}));const f=gS(r.optionData.textSpeed),d=gs(t.content,3).reduce((E,T)=>E+T.length,0),p=f*d;for(const E of t.args)if(E.key==="fontSize")switch(E.value){case"default":n(Ge({key:"showTextSize",value:-1}));break;case"small":n(Ge({key:"showTextSize",value:ti.small}));break;case"medium":n(Ge({key:"showTextSize",value:ti.medium}));break;case"large":n(Ge({key:"showTextSize",value:ti.large}));break}let v=e.showName;u!==null&&(v=u),l&&(v=""),n(Ge({key:"showName",value:v}));let g=null,m=0,y="",_="";for(const E of t.args)E.value===!0&&zf(E.key).with("left",()=>{y="left"}).with("right",()=>{y="right"}).endsWith("center",()=>{y="center"}),E.key==="figureId"&&(_=`${E.value.toString()}`);let x=80;const b=(E=!1)=>{let T=x+(Math.random()*60-30);Math.abs(T-x)<5&&(T=x+Math.sign(T-x)*5),x=Math.max(15,Math.min(T,100));const P=te.getState().stage.figureAssociatedAnimation.find(M=>M.targetId===_),k=_||`fig-${y}`;E&&(x=0),u_({audioLevel:x,OPEN_THRESHOLD:50,HALF_OPEN_THRESHOLD:25,currentMouthValue:0,lerpSpeed:1,key:k,animationItem:P,pos:y}),E||(g=setTimeout(b,50))};c?Bie(t):(_||y)&&(m=d*250,b());const S=TS();let w=750-r.optionData.textSpeed*250;return s&&(w=0),{performName:S,duration:p+w+m,isHoldOn:!1,stopFunction:()=>{L.events.textSettle.emit(),g&&(b(!0),clearTimeout(g))},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0,goNextWhenOver:s}};var yS={},Qc={document:{}},DF=Object.prototype.hasOwnProperty,BF=function(t){return qv(t)?t.toLowerCase():t},Ec=Array.isArray,hae=function(t){return qv(t)?t.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)|32)}):t};"I".toLowerCase()!=="i"&&(BF=hae);var dae,_S=Object.prototype.toString,jF=Object.getPrototypeOf,qg=XF("ng");Qc.angular||(Qc.angular={});Qc.document.documentMode;function pae(t){if(t==null||SS(t))return!1;if(Ec(t)||qv(t)||dae)return!0;var e="length"in Object(t)&&t.length;return bS(e)&&(e>=0&&(e-1 in t||t instanceof Array)||typeof t.item=="function")}function Dt(t,e,r){var n,i;if(t)if(VF(t))for(n in t)n!=="prototype"&&n!=="length"&&n!=="name"&&t.hasOwnProperty(n)&&e.call(r,t[n],n,t);else if(Ec(t)||pae(t)){var a=typeof t!="object";for(n=0,i=t.length;n"u"}function sl(t){return typeof t<"u"}function UF(t){return t!==null&&typeof t=="object"}function $F(t){return t!==null&&typeof t=="object"&&!jF(t)}function qv(t){return typeof t=="string"}function bS(t){return typeof t=="number"}function VF(t){return typeof t=="function"}function SS(t){return t&&t.window===t}function GF(t){return t&&t.$evalAsync&&t.$watch}var gae=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;function yae(t){return t&&bS(t.length)&&gae.test(_S.call(t))}function _ae(t){return _S.call(t)==="[object ArrayBuffer]"}function xae(t,e){var r=[],n=[];if(e){if(yae(e)||_ae(e))throw qg("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t===e)throw qg("cpi","Can't copy! Source and destination are identical.");return Ec(e)?e.length=0:Dt(e,function(s,u){u!=="$$hashKey"&&delete e[u]}),r.push(t),n.push(e),i(t,e)}return a(t);function i(s,u){var l=u.$$hashKey,c;if(Ec(s))for(var f=0,h=s.length;f=0)return"...";e.push(n)}return n})}function RP(t){return typeof t=="function"?t.toString().replace(/ \{[\s\S]*$/,""):mae(t)?"undefined":typeof t!="string"?Eae(t):t}function XF(t,e){return e=e||Error,function(){var r=2,n=arguments,i=n[0],a="["+(t?t+":":"")+i+"] ",o=n[1],s,u;for(a+=o.replace(/\{\d+\}/g,function(l){var c=+l.slice(1,-1),f=c+r;return f <= >= && || ! = |".split(" "),function(t){gd[t]=!0});var Tae={n:` -`,f:"\f",r:"\r",t:" ",v:"\v","'":"'",'"':'"'},f_=function(e){this.options=e};f_.prototype={constructor:f_,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index=55296&&r<=56319&&n>=56320&&n<=57343?t+e:t},isExpOperator:function(t){return t==="-"||t==="+"||this.isNumber(t)},throwError:function(t,e,r){r=r||this.index;var n=sl(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,r)+"]":" "+r;throw ll("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,n,this.text)},readNumber:function(){for(var t="",e=this.index;this.index0&&!this.peek("}",")",";","]")&&t.push(this.expressionStatement()),!this.expect(";"))return{type:le.Program,body:t}},expressionStatement:function(){return{type:le.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var t=this.expression();this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var t=this.ternary();if(this.expect("=")){if(!HF(t))throw ll("lval","Trying to assign a value to a non l-value");t={type:le.AssignmentExpression,left:t,right:this.assignment(),operator:"="}}return t},ternary:function(){var t=this.logicalOR(),e,r;return this.expect("?")&&(e=this.expression(),this.consume(":"))?(r=this.expression(),{type:le.ConditionalExpression,test:t,alternate:e,consequent:r}):t},logicalOR:function(){for(var t=this.logicalAND();this.expect("||");)t={type:le.LogicalExpression,operator:"||",left:t,right:this.logicalAND()};return t},logicalAND:function(){for(var t=this.equality();this.expect("&&");)t={type:le.LogicalExpression,operator:"&&",left:t,right:this.equality()};return t},equality:function(){for(var t=this.relational(),e;e=this.expect("==","!=","===","!==");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var t=this.additive(),e;e=this.expect("<",">","<=",">=");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var t=this.multiplicative(),e;e=this.expect("+","-");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var t=this.unary(),e;e=this.expect("*","/","%");)t={type:le.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var t;return(t=this.expect("+","-","!"))?{type:le.UnaryExpression,operator:t.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?t=xae(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?t={type:le.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e;e=this.expect("(","[",".");)e.text==="("?(t={type:le.CallExpression,callee:t,arguments:this.parseArguments()},this.consume(")")):e.text==="["?(t={type:le.MemberExpression,object:t,property:this.expression(),computed:!0},this.consume("]")):e.text==="."?t={type:le.MemberExpression,object:t,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return t},filter:function(t){for(var e=[t],r={type:le.CallExpression,callee:this.identifier(),arguments:e,filter:!0};this.expect(":");)e.push(this.expression());return r},parseArguments:function(){var t=[];if(this.peekToken().text!==")")do t.push(this.filterChain());while(this.expect(","));return t},identifier:function(){var t=this.consume();return t.identifier||this.throwError("is not a valid identifier",t),{type:le.Identifier,name:t.text}},constant:function(){return{type:le.Literal,value:this.consume().value}},arrayDeclaration:function(){var t=[];if(this.peekToken().text!=="]")do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:le.ArrayExpression,elements:t}},object:function(){var t=[],e;if(this.peekToken().text!=="}")do{if(this.peek("}"))break;e={type:le.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:le.ObjectExpression,properties:t}},throwError:function(t,e){throw ll("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},consume:function(t){if(this.tokens.length===0)throw ll("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},peekToken:function(){if(this.tokens.length===0)throw ll("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,r,n){return this.peekAhead(0,t,e,r,n)},peekAhead:function(t,e,r,n,i){if(this.tokens.length>t){var a=this.tokens[t],o=a.text;if(o===e||o===r||o===n||o===i||!e&&!r&&!n&&!i)return a}return!1},expect:function(t,e,r,n){var i=this.peek(t,e,r,n);return i?(this.tokens.shift(),i):!1},selfReferential:{this:{type:le.ThisExpression},$locals:{type:le.LocalsExpression}}};function Aae(t,e){return typeof t<"u"?t:e}function WF(t,e){return typeof t>"u"?e:typeof e>"u"?t:t+e}function Cae(t,e){var r=t(e);if(!r)throw new Error("Filter '"+e+"' is not defined");return!r.$stateful}function Er(t,e){var r,n,i;switch(t.type){case le.Program:r=!0,Dt(t.body,function(a){Er(a.expression,e),r=r&&a.expression.constant}),t.constant=r;break;case le.Literal:t.constant=!0,t.toWatch=[];break;case le.UnaryExpression:Er(t.argument,e),t.constant=t.argument.constant,t.toWatch=t.argument.toWatch;break;case le.BinaryExpression:Er(t.left,e),Er(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.left.toWatch.concat(t.right.toWatch);break;case le.LogicalExpression:Er(t.left,e),Er(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.constant?[]:[t];break;case le.ConditionalExpression:Er(t.test,e),Er(t.alternate,e),Er(t.consequent,e),t.constant=t.test.constant&&t.alternate.constant&&t.consequent.constant,t.toWatch=t.constant?[]:[t];break;case le.Identifier:t.constant=!1,t.toWatch=[t];break;case le.MemberExpression:Er(t.object,e),t.computed&&Er(t.property,e),t.constant=t.object.constant&&(!t.computed||t.property.constant),t.toWatch=[t];break;case le.CallExpression:i=t.filter?Cae(e,t.callee.name):!1,r=i,n=[],Dt(t.arguments,function(a){Er(a,e),r=r&&a.constant,a.constant||n.push.apply(n,a.toWatch)}),t.constant=r,t.toWatch=i?n:[t];break;case le.AssignmentExpression:Er(t.left,e),Er(t.right,e),t.constant=t.left.constant&&t.right.constant,t.toWatch=[t];break;case le.ArrayExpression:r=!0,n=[],Dt(t.elements,function(a){Er(a,e),r=r&&a.constant,a.constant||n.push.apply(n,a.toWatch)}),t.constant=r,t.toWatch=n;break;case le.ObjectExpression:r=!0,n=[],Dt(t.properties,function(a){Er(a.value,e),r=r&&a.value.constant&&!a.computed,a.value.constant||n.push.apply(n,a.value.toWatch)}),t.constant=r,t.toWatch=n;break;case le.ThisExpression:t.constant=!1,t.toWatch=[];break;case le.LocalsExpression:t.constant=!1,t.toWatch=[];break}}function YF(t){if(t.length===1){var e=t[0].expression,r=e.toWatch;return r.length!==1||r[0]!==e?r:void 0}}function HF(t){return t.type===le.Identifier||t.type===le.MemberExpression}function qF(t){if(t.body.length===1&&HF(t.body[0].expression))return{type:le.AssignmentExpression,left:t.body[0].expression,right:{type:le.NGValueParameter},operator:"="}}function KF(t){return t.body.length===0||t.body.length===1&&(t.body[0].expression.type===le.Literal||t.body[0].expression.type===le.ArrayExpression||t.body[0].expression.type===le.ObjectExpression)}function ZF(t){return t.constant}function QF(t,e){this.astBuilder=t,this.$filter=e}QF.prototype={compile:function(t){var e=this,r=this.astBuilder.ast(t);this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},Er(r,e.$filter);var n="",i;if(this.stage="assign",i=qF(r)){this.state.computing="assign";var a=this.nextId();this.recurse(i,a),this.return_(a),n="fn.assign="+this.generateFunction("assign","s,v,l")}var o=YF(r.body);e.stage="inputs",Dt(o,function(l,c){var f="fn"+c;e.state[f]={vars:[],body:[],own:{}},e.state.computing=f;var h=e.nextId();e.recurse(l,h),e.return_(h),e.state.inputs.push(f),l.watchId=c}),this.state.computing="fn",this.stage="main",this.recurse(r);var s='"'+this.USE+" "+this.STRICT+`"; -`+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+n+this.watchFns()+"return fn;",u=new Function("$filter","getStringValue","ifDefined","plus",s)(this.$filter,zF,Aae,WF);return this.state=this.stage=void 0,u.ast=r,u.literal=KF(r),u.constant=ZF(r),u},USE:"use",STRICT:"strict",watchFns:function(){var t=[],e=this.state.inputs,r=this;return Dt(e,function(n){t.push("var "+n+"="+r.generateFunction(n,"s"))}),e.length&&t.push("fn.inputs=["+e.join(",")+"];"),t.join("")},generateFunction:function(t,e){return"function("+e+"){"+this.varsPrefix(t)+this.body(t)+"};"},filterPrefix:function(){var t=[],e=this;return Dt(this.state.filters,function(r,n){t.push(r+"=$filter("+e.escape(n)+")")}),t.length?"var "+t.join(",")+";":""},varsPrefix:function(t){return this.state[t].vars.length?"var "+this.state[t].vars.join(",")+";":""},body:function(t){return this.state[t].body.join("")},recurse:function(t,e,r,n,i,a){var o,s,u=this,l,c,f;if(n=n||xS,!a&&sl(t.watchId)){e=e||this.nextId(),this.if_("i",this.lazyAssign(e,this.unsafeComputedMember("i",t.watchId)),this.lazyRecurse(t,e,r,n,i,!0));return}switch(t.type){case le.Program:Dt(t.body,function(d,p){u.recurse(d.expression,void 0,void 0,function(v){s=v}),p!==t.body.length-1?u.current().body.push(s,";"):u.return_(s)});break;case le.Literal:c=this.escape(t.value),this.assign(e,c),n(e||c);break;case le.UnaryExpression:this.recurse(t.argument,void 0,void 0,function(d){s=d}),c=t.operator+"("+this.ifDefined(s,0)+")",this.assign(e,c),n(c);break;case le.BinaryExpression:this.recurse(t.left,void 0,void 0,function(d){o=d}),this.recurse(t.right,void 0,void 0,function(d){s=d}),t.operator==="+"?c=this.plus(o,s):t.operator==="-"?c=this.ifDefined(o,0)+t.operator+this.ifDefined(s,0):c="("+o+")"+t.operator+"("+s+")",this.assign(e,c),n(c);break;case le.LogicalExpression:e=e||this.nextId(),u.recurse(t.left,e),u.if_(t.operator==="&&"?e:u.not(e),u.lazyRecurse(t.right,e)),n(e);break;case le.ConditionalExpression:e=e||this.nextId(),u.recurse(t.test,e),u.if_(e,u.lazyRecurse(t.alternate,e),u.lazyRecurse(t.consequent,e)),n(e);break;case le.Identifier:e=e||this.nextId();var h=u.current().inAssignment;r&&(h?r.context=this.assign(this.nextId(),"s"):r.context=u.stage==="inputs"?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",t.name)+"?l:s"),r.computed=!1,r.name=t.name),u.if_(u.stage==="inputs"||u.not(u.getHasOwnProperty("l",t.name)),function(){u.if_(u.stage==="inputs"||u.and_("s",u.or_(u.isNull(u.nonComputedMember("s",t.name)),u.hasOwnProperty_("s",t.name))),function(){i&&i!==1&&u.if_(u.isNull(u.nonComputedMember("s",t.name)),u.lazyAssign(u.nonComputedMember("s",t.name),"{}")),u.assign(e,u.nonComputedMember("s",t.name))})},e&&u.lazyAssign(e,u.nonComputedMember("l",t.name))),n(e);break;case le.MemberExpression:o=r&&(r.context=this.nextId())||this.nextId(),e=e||this.nextId(),u.recurse(t.object,o,void 0,function(){var d=null,p=u.current().inAssignment;t.computed?(s=u.nextId(),p||u.state.computing==="assign"?d=u.unsafeComputedMember(o,s):d=u.computedMember(o,s)):(p||u.state.computing==="assign"?d=u.unsafeNonComputedMember(o,t.property.name):d=u.nonComputedMember(o,t.property.name),s=t.property.name),t.computed&&t.property.type===le.Literal&&u.recurse(t.property,s),u.if_(u.and_(u.notNull(o),u.or_(u.isNull(d),u.hasOwnProperty_(o,s,t.computed))),function(){t.computed?(t.property.type!==le.Literal&&u.recurse(t.property,s),i&&i!==1&&u.if_(u.not(d),u.lazyAssign(d,"{}")),u.assign(e,d),r&&(r.computed=!0,r.name=s)):(i&&i!==1&&u.if_(u.isNull(d),u.lazyAssign(d,"{}")),u.assign(e,d),r&&(r.computed=!1,r.name=t.property.name))},function(){u.assign(e,"undefined")}),n(e)},!!i);break;case le.CallExpression:e=e||this.nextId(),t.filter?(s=u.filter(t.callee.name),l=[],Dt(t.arguments,function(d){var p=u.nextId();u.recurse(d,p),l.push(p)}),c=s+".call("+s+","+l.join(",")+")",u.assign(e,c),n(e)):(s=u.nextId(),o={},l=[],u.recurse(t.callee,s,o,function(){u.if_(u.notNull(s),function(){if(Dt(t.arguments,function(p){u.recurse(p,t.constant?void 0:u.nextId(),void 0,function(v){l.push(v)})}),o.name){var d=u.member(o.context,o.name,o.computed);c="("+d+" === null ? null : "+u.unsafeMember(o.context,o.name,o.computed)+".call("+[o.context].concat(l).join(",")+"))"}else c=s+"("+l.join(",")+")";u.assign(e,c)},function(){u.assign(e,"undefined")}),n(e)}));break;case le.AssignmentExpression:s=this.nextId(),o={},u.current().inAssignment=!0,this.recurse(t.left,void 0,o,function(){u.if_(u.and_(u.notNull(o.context),u.or_(u.hasOwnProperty_(o.context,o.name),u.isNull(u.member(o.context,o.name,o.computed)))),function(){u.recurse(t.right,s),c=u.member(o.context,o.name,o.computed)+t.operator+s,u.assign(e,c),n(e||c)}),u.current().inAssignment=!1,u.recurse(t.right,s),u.current().inAssignment=!0},1),u.current().inAssignment=!1;break;case le.ArrayExpression:l=[],Dt(t.elements,function(d){u.recurse(d,t.constant?void 0:u.nextId(),void 0,function(p){l.push(p)})}),c="["+l.join(",")+"]",this.assign(e,c),n(e||c);break;case le.ObjectExpression:l=[],f=!1,Dt(t.properties,function(d){d.computed&&(f=!0)}),f?(e=e||this.nextId(),this.assign(e,"{}"),Dt(t.properties,function(d){d.computed?(o=u.nextId(),u.recurse(d.key,o)):o=d.key.type===le.Identifier?d.key.name:""+d.key.value,s=u.nextId(),u.recurse(d.value,s),u.assign(u.unsafeMember(e,o,d.computed),s)})):(Dt(t.properties,function(d){u.recurse(d.value,t.constant?void 0:u.nextId(),void 0,function(p){l.push(u.escape(d.key.type===le.Identifier?d.key.name:""+d.key.value)+":"+p)})}),c="{"+l.join(",")+"}",this.assign(e,c)),n(e||c);break;case le.ThisExpression:this.assign(e,"s"),n(e||"s");break;case le.LocalsExpression:this.assign(e,"l"),n(e||"l");break;case le.NGValueParameter:this.assign(e,"v"),n(e||"v");break}},getHasOwnProperty:function(t,e){var r=t+"."+e,n=this.current().own;return n.hasOwnProperty(r)||(n[r]=this.nextId(!1,t+"&&("+this.escape(e)+" in "+t+")")),n[r]},assign:function(t,e){if(t)return this.current().body.push(t,"=",e,";"),t},filter:function(t){return this.state.filters.hasOwnProperty(t)||(this.state.filters[t]=this.nextId(!0)),this.state.filters[t]},ifDefined:function(t,e){return"ifDefined("+t+","+this.escape(e)+")"},plus:function(t,e){return"plus("+t+","+e+")"},return_:function(t){this.current().body.push("return ",t,";")},if_:function(t,e,r){if(t===!0)e();else{var n=this.current().body;n.push("if(",t,"){"),e(),n.push("}"),r&&(n.push("else{"),r(),n.push("}"))}},or_:function(t,e){return"("+t+") || ("+e+")"},hasOwnProperty_:function(t,e,r){return r?"(Object.prototype.hasOwnProperty.call("+t+","+e+"))":"(Object.prototype.hasOwnProperty.call("+t+",'"+e+"'))"},and_:function(t,e){return"("+t+") && ("+e+")"},not:function(t){return"!("+t+")"},isNull:function(t){return t+"==null"},notNull:function(t){return t+"!=null"},nonComputedMember:function(t,e){var r=/^[$_a-zA-Z][$_a-zA-Z0-9]*$/,n=/[^$_a-zA-Z0-9]/g,i="";return r.test(e)?i=t+"."+e:(e=e.replace(n,this.stringEscapeFn),i=t+'["'+e+'"]'),i},unsafeComputedMember:function(t,e){return t+"["+e+"]"},unsafeNonComputedMember:function(t,e){return this.nonComputedMember(t,e)},computedMember:function(t,e){return this.state.computing==="assign"?this.unsafeComputedMember(t,e):"("+t+".hasOwnProperty("+e+") ? "+t+"["+e+"] : null)"},unsafeMember:function(t,e,r){return r?this.unsafeComputedMember(t,e):this.unsafeNonComputedMember(t,e)},member:function(t,e,r){return r?this.computedMember(t,e):this.nonComputedMember(t,e)},getStringValue:function(t){this.assign(t,"getStringValue("+t+")")},lazyRecurse:function(t,e,r,n,i,a){var o=this;return function(){o.recurse(t,e,r,n,i,a)}},lazyAssign:function(t,e){var r=this;return function(){r.assign(t,e)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)},escape:function(t){if(qv(t))return"'"+t.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(bS(t))return t.toString();if(t===!0)return"true";if(t===!1)return"false";if(t===null)return"null";if(typeof t>"u")return"undefined";throw ll("esc","IMPOSSIBLE")},nextId:function(t,e){var r="v"+this.state.nextId++;return t||this.current().vars.push(r+(e?"="+e:"")),r},current:function(){return this.state[this.state.computing]}};function JF(t,e){this.astBuilder=t,this.$filter=e}JF.prototype={compile:function(t){var e=this,r=this.astBuilder.ast(t);Er(r,e.$filter);var n,i;(n=qF(r))&&(i=this.recurse(n));var a=YF(r.body),o;a&&(o=[],Dt(a,function(l,c){var f=e.recurse(l);l.input=f,o.push(f),l.watchId=c}));var s=[];Dt(r.body,function(l){s.push(e.recurse(l.expression))});var u=r.body.length===0?xS:r.body.length===1?s[0]:function(l,c){var f;return Dt(s,function(h){f=h(l,c)}),f};return i&&(u.assign=function(l,c,f){return i(l,f,c)}),o&&(u.inputs=o),u.ast=r,u.literal=KF(r),u.constant=ZF(r),u},recurse:function(t,e,r){var n,i,a=this,o;if(t.input)return this.inputs(t.input,t.watchId);switch(t.type){case le.Literal:return this.value(t.value,e);case le.UnaryExpression:return i=this.recurse(t.argument),this["unary"+t.operator](i,e);case le.BinaryExpression:return n=this.recurse(t.left),i=this.recurse(t.right),this["binary"+t.operator](n,i,e);case le.LogicalExpression:return n=this.recurse(t.left),i=this.recurse(t.right),this["binary"+t.operator](n,i,e);case le.ConditionalExpression:return this["ternary?:"](this.recurse(t.test),this.recurse(t.alternate),this.recurse(t.consequent),e);case le.Identifier:return a.identifier(t.name,e,r);case le.MemberExpression:return n=this.recurse(t.object,!1,!!r),t.computed||(i=t.property.name),t.computed&&(i=this.recurse(t.property)),t.computed?this.computedMember(n,i,e,r):this.nonComputedMember(n,i,e,r);case le.CallExpression:return o=[],Dt(t.arguments,function(s){o.push(a.recurse(s))}),t.filter&&(i=this.$filter(t.callee.name)),t.filter||(i=this.recurse(t.callee,!0)),t.filter?function(s,u,l,c){for(var f=[],h=0;h":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)>e(n,i,a,o);return r?{value:s}:s}},"binary<=":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)<=e(n,i,a,o);return r?{value:s}:s}},"binary>=":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)>=e(n,i,a,o);return r?{value:s}:s}},"binary&&":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)&&e(n,i,a,o);return r?{value:s}:s}},"binary||":function(t,e,r){return function(n,i,a,o){var s=t(n,i,a,o)||e(n,i,a,o);return r?{value:s}:s}},"ternary?:":function(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s)?e(i,a,o,s):r(i,a,o,s);return n?{value:u}:u}},value:function(t,e){return function(){return e?{context:void 0,name:void 0,value:t}:t}},identifier:function(t,e,r){return function(n,i,a,o){var s=i&&t in i?i:n;r&&r!==1&&s&&s[t]==null&&(s[t]={});var u=s?s[t]:void 0;return e?{context:s,name:t,value:u}:u}},computedMember:function(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s),l,c;return u!=null&&(l=e(i,a,o,s),l=zF(l),n&&n!==1&&u&&!u[l]&&(u[l]={}),Object.prototype.hasOwnProperty.call(u,l)&&(c=u[l])),r?{context:u,name:l,value:c}:c}},nonComputedMember:function(t,e,r,n){return function(i,a,o,s){var u=t(i,a,o,s);n&&n!==1&&u&&u[e]==null&&(u[e]={});var l=void 0;return u!=null&&Object.prototype.hasOwnProperty.call(u,e)&&(l=u[e]),r?{context:u,name:e,value:l}:l}},inputs:function(t,e){return function(r,n,i,a){return a?a[e]:t(r,n,i)}}};var h_=function(e,r,n){this.lexer=e,this.$filter=r,this.options=n,this.ast=new le(e,n),this.astCompiler=n.csp?new JF(this.ast,r):new QF(this.ast,r)};h_.prototype={constructor:h_,parse:function(t){return this.astCompiler.compile(t)}};yS.Lexer=f_;yS.Parser=h_;var eN=yS,Pae={},Oae=eN.Lexer,Rae=eN.Parser;function wS(t,e){e=e||{};var r=e.filters||Pae,n=e.filters?e.cache||{}:wS.cache,i=e,a;if(typeof t!="string")throw new TypeError("src must be a string, instead saw '"+typeof t+"'");var o={csp:e.csp!=null?e.csp:!1,literals:e.literals!=null?e.literals:{true:!0,false:!1,null:null,undefined:void 0}},s=new Oae(i),u=new Rae(s,function(c){return r[c]},o);return n?(a=n[t],a||(a=n[t]=u.parse(t)),a):u.parse(t)}wS.cache=Object.create(null);var tN=wS;const Iae=t=>{let e=!1;t.args.forEach(n=>{n.key==="global"&&(e=!0)});let r;if(e?r=lW:r=Pk,t.content.match(/\s*=\s*/)){const n=t.content.split(/\s*=\s*/)[0],i=t.content.split(/\s*=\s*/)[1];if(i==="random()")te.dispatch(r({key:n,value:Math.random()}));else if(i.match(/[+\-*\/()]/)){const o=i.split(/([+\-*\/()])/g).map(u=>{if(!u.trim().match(/^[a-zA-Z_$][a-zA-Z0-9_.]*$/))return u;const l=fp(u.trim(),!0);return typeof l=="string"?`'${l}'`:l}).reduce((u,l)=>u+l,"");let s="";try{s=tN(o)()}catch(u){ge.error("expression compile error",u)}te.dispatch(r({key:n,value:s}))}else i.match(/true|false/)?(i.match(/true/)&&te.dispatch(r({key:n,value:!0})),i.match(/false/)&&te.dispatch(r({key:n,value:!1}))):i.length===0?te.dispatch(r({key:n,value:""})):isNaN(Number(i))?te.dispatch(r({key:n,value:fp(i,!0)})):te.dispatch(r({key:n,value:Number(i)}));e?(ge.debug("设置全局变量:",{key:n,value:te.getState().userData.globalGameVar[n]}),hp()):ge.debug("设置变量:",{key:n,value:te.getState().stage.GameVar[n]})}return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function kae(t){let e;const r=te.getState().stage,n=te.getState().userData,i={stage:r,userData:n};if(r.GameVar.hasOwnProperty(t))e=r.GameVar[t];else if(n.globalGameVar.hasOwnProperty(t))e=n.globalGameVar[t];else if(t.startsWith("$")){const a=t.replace("$","");e=Aee(i,a,void 0)}return e}function fp(t,e=!1){const r=kae(t);return r??(ge.warn("valueFromState result null, key = "+t),e?t:`{${t}}`)}const Mae=t=>{const e=te.getState().stage,r=te.getState().userData,n=te.dispatch,i={stageGameVar:e.GameVar,globalGameVar:r.globalGameVar};n(Ge({key:"showText",value:JSON.stringify(i)})),n(Ge({key:"showName",value:"展示变量"})),ge.debug("展示变量:",i),setTimeout(()=>{L.events.textSettle.emit()},0);const a=TS(),o=750-r.optionData.textSpeed*250;return{performName:a,duration:o,isHoldOn:!1,stopFunction:()=>{L.events.textSettle.emit()},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}};function it(t,e,r){return{scriptType:t,scriptFunction:e,...r}}const rN={};function Fae(t){const e={};for(const[r,n]of Object.entries(t))e[r]=rN[n.scriptType]={scriptString:r,...n};return e}const Nae=t=>{const{content:e}=t,r=e.split(",");for(const n of r){const i=n.split("->");if(i.length>=2){const a=i[0],o=i[1];te.dispatch(Tr.replaceUIlable([a,o]))}}return{performName:"none",duration:0,isHoldOn:!1,stopFunction:()=>{},blockingNext:()=>!1,blockingAuto:()=>!0,stopTimeout:void 0}},nN=Fae({intro:it(Qe.intro,iie),changeBg:it(Qe.changeBg,Xte),changeFigure:it(Qe.changeFigure,zte),miniAvatar:it(Qe.miniAvatar,oie,{next:!0}),changeScene:it(Qe.changeScene,Wte),choose:it(Qe.choose,Fne),end:it(Qe.end,Iie),bgm:it(Qe.bgm,o7,{next:!0}),playVideo:it(Qe.video,pie),setComplexAnimation:it(Qe.setComplexAnimation,yie),setFilter:it(Qe.setFilter,xie),pixiInit:it(Qe.pixiInit,Mie,{next:!0}),pixiPerform:it(Qe.pixi,hie,{next:!0}),label:it(Qe.label,aie,{next:!0}),jumpLabel:it(Qe.jumpLabel,kie),setVar:it(Qe.setVar,Iae,{next:!0}),showVars:it(Qe.showVars,Mae),unlockCg:it(Qe.unlockCg,Pie,{next:!0}),unlockBgm:it(Qe.unlockBgm,Cie,{next:!0}),say:it(Qe.say,fae),filmMode:it(Qe.filmMode,Dne,{next:!0}),callScene:it(Qe.callScene,MZ),setTextbox:it(Qe.setTextbox,Sie),setAnimation:it(Qe.setAnimation,vie),playEffect:it(Qe.playEffect,die,{next:!0}),setTempAnimation:it(Qe.setTempAnimation,bie),__commment:it(Qe.comment,Lne,{next:!0}),setTransform:it(Qe.setTransform,wie),setTransition:it(Qe.setTransition,Aie,{next:!0}),getUserInput:it(Qe.getUserInput,Xne),applyStyle:it(Qe.applyStyle,Nae,{next:!0})}),iN=Object.values(nN),Lae=iN.filter(t=>t.next).map(t=>t.scriptType),Kv=new a7(gW,Nn,Lae,iN),ca=(t,e,r)=>{const n=Kv.parse(t,e,r);return ge.info(`解析场景:${e},数据为:`,n),n},ES=t=>{var n;let e=mW;e=(((n=rN[t.command])==null?void 0:n.scriptFunction)??nN.say.scriptFunction)(t),e.arrangePerformPromise?e.arrangePerformPromise.then(i=>L.gameplay.performController.arrangeNewPerform(i,t)):L.gameplay.performController.arrangeNewPerform(e,t)},Dae=t=>{L.sceneManager.lockSceneWrite||(L.sceneManager.lockSceneWrite=!0,ua(t.sceneUrl).then(e=>{L.sceneManager.sceneData.currentScene=ca(e,t.sceneName,t.sceneUrl),L.sceneManager.sceneData.currentSentenceId=t.continueLine+1,ge.debug("现在恢复场景,恢复后场景:",L.sceneManager.sceneData.currentScene),L.sceneManager.lockSceneWrite=!1,tn()}).catch(e=>{ge.error("场景调用错误",e),L.sceneManager.lockSceneWrite=!1}))};function Bae(t){try{return tN(t)()}catch{return!1}}const d_=t=>{if(t===void 0)return!0;const r=t.split(/([+\-*\/()>=|<=|==|&&|\|\||!=)/g).map(n=>n.match(/[a-zA-Z]/)?n.match(/true/)||n.match(/false/)?n:fp(n,!0):n).reduce((n,i)=>n+i,"");return!!Bae(r)},aN=()=>{if(L.sceneManager.sceneData.currentSentenceId>L.sceneManager.sceneData.currentScene.sentenceList.length-1){if(L.sceneManager.sceneData.sceneStack.length!==0){const l=L.sceneManager.sceneData.sceneStack.pop();l!==void 0&&Dae(l)}return}const t=L.sceneManager.sceneData.currentScene.sentenceList[L.sceneManager.sceneData.currentSentenceId],e=l=>{let c=l;const f=c.match(new RegExp("(?{const d=fp(h.replace(new RegExp("(?{t.content=e(t.content),t.args.forEach(l=>{l.value&&typeof l.value=="string"&&(l.value=e(l.value))})})();let n=!0,i=!1,a="";if(t.args.forEach(l=>{l.key==="when"&&(i=!0,a=l.value.toString())}),i&&(n=d_(a)),!n){ge.warn("不满足条件,跳过本句!"),L.sceneManager.sceneData.currentSentenceId++,tn();return}ES(t);let o=!1;t.args.forEach(l=>{l.key==="next"&&l.value&&(o=!0)});let s=t.command===Qe.say;t.args.forEach(l=>{l.key==="notend"&&l.value===!0&&(s=!1)});let u;if(o){L.sceneManager.sceneData.currentSentenceId++,aN();return}setTimeout(()=>{u=te.getState().stage;const l={currentStageState:u,globalGameVar:te.getState().userData.globalGameVar};ge.debug("本条语句执行结果",l),s&&L.backlogManager.saveCurrentStateToBacklog()},0),L.sceneManager.sceneData.currentSentenceId++},tn=()=>{if(L.events.userInteractNext.emit(),te.getState().GUI.showTitle)return;let e=!1;if(L.gameplay.performController.performList.forEach(i=>{i.blockingNext()&&(e=!0)}),e){ge.warn("next 被阻塞!");return}let r=!0;if(L.gameplay.performController.performList.forEach(i=>{!i.isHoldOn&&!i.skipNextCollect&&(r=!1)}),r){const i=te.getState().stage,a=Jt(i);for(let o=0;oMath.random().toString().substring(0,10);class jae{constructor(){Ae(this,"performList",[]);Ae(this,"timeoutList",[])}arrangeNewPerform(e,r,n=!0){if(this.performList.findIndex(a=>a.performName===e.performName)>-1)for(let a=0;a{e.isHoldOn||this.unmountPerform(e.performName)},e.duration),r.args.find(a=>a.key==="continue"&&a.value===!0)&&(e.goNextWhenOver=!0),this.performList.push(e)}}unmountPerform(e,r=!1){if(r)for(let n=0;n{n.blockingAuto()&&(e=!0)}),e?setTimeout(this.goNextWhenOver,100):tn()}}class Uae{constructor(){Ae(this,"isAuto",!1);Ae(this,"isFast",!1);Ae(this,"autoInterval",null);Ae(this,"fastInterval",null);Ae(this,"autoTimeout",null);Ae(this,"pixiStage",null);Ae(this,"performController",new jae)}resetGamePlay(){this.performController.timeoutList=[],this.isAuto=!1,this.isFast=!1;const e=this.autoInterval;e!==null&&clearInterval(e),this.autoInterval=null;const r=this.fastInterval;r!==null&&clearInterval(r),this.fastInterval=null;const n=this.autoTimeout;n!==null&&clearInterval(n),this.autoTimeout=null}}function $ae(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(i){i(r)}),(n=t.get("*"))&&n.slice().map(function(i){i(e,r)})}}}class Vae{constructor(){Ae(this,"textSettle",_h("text-settle"));Ae(this,"userInteractNext",_h("__NEXT"));Ae(this,"fullscreenDbClick",_h("fullscreen-dbclick"));Ae(this,"styleUpdate",_h("style-update"))}}const Kg=$ae();function _h(t){return{on:(e,r)=>{Kg.on(`${t}-${r??""}`,e)},emit:(e,r)=>{Kg.emit(`${t}-${r??""}`,e)},off:(e,r)=>{Kg.off(`${t}-${r??""}`,e)}}}class Gae{constructor(){Ae(this,"sceneManager",new pW);Ae(this,"backlogManager",new dW(this.sceneManager));Ae(this,"animationManager",new vW);Ae(this,"gameplay",new Uae);Ae(this,"gameName","");Ae(this,"gameKey","");Ae(this,"events",new Vae)}}const L=new Gae,st=oN(()=>{const t=te.getState().userData;ms.setItem(L.gameKey,t).then(()=>{ge.info("写入本地存储")})},100),Jc=oN(()=>{ms.getItem(L.gameKey).then(t=>{if(!t||!sN(t)){ge.warn("现在重置数据"),st();return}te.dispatch(Bb(t))})},100);function oN(t,e){let r;function n(...i){clearTimeout(r);let a;return r=setTimeout(()=>{a=t.apply(n,i)},e),a}return n}const hp=()=>{const t=te.getState().userData;ms.setItem(L.gameKey,t).then(()=>{ms.getItem(L.gameKey).then(e=>{if(!e){st();return}te.dispatch(Bb(e))}),ge.info("同步本地存储")})};function sN(t){let e=!0;for(const r in K0)t.hasOwnProperty(r)||(e=!1);return e}async function lN(){const t=await ms.getItem(L.gameKey);if(!t||!sN(t)){const e=te.getState().userData;return ge.warn("现在重置数据"),await ms.setItem(L.gameKey,e)}else te.dispatch(Bb(t))}var vt=(t=>(t[t.Save=0]="Save",t[t.Load=1]="Load",t[t.Option=2]="Option",t))(vt||{});const Xae={showBacklog:!1,showStarter:!0,showTitle:!0,showMenuPanel:!1,showTextBox:!0,showControls:!0,controlsVisibility:!0,currentMenuTag:vt.Option,titleBg:"",titleBgm:"",logoImage:[],showExtra:!1,showGlobalDialog:!1,showPanicOverlay:!1,isEnterGame:!1,isShowLogo:!0},uN=Qp({name:"gui",initialState:Xae,reducers:{setVisibility:(t,e)=>{Jc();const{component:r,visibility:n}=e.payload;t[r]=n},setMenuPanelTag:(t,e)=>{Jc(),t.currentMenuTag=e.payload},setGuiAsset:(t,e)=>{const{asset:r,value:n}=e.payload;t[r]=n},setLogoImage:(t,e)=>{t.logoImage=[...e.payload]}}}),{setVisibility:rt,setMenuPanelTag:ss,setGuiAsset:dp,setLogoImage:zae}=uN.actions,Wae=uN.reducer,te=TU({reducer:{stage:rz,GUI:Wae,userData:fW,saveData:Rie},middleware:tk({serializableCheck:!1})});let IP;function AS(t,e=0,r=100){if(ge.debug("playing bgm"+t),t===""){IP=setTimeout(()=>{te.dispatch(Ge({key:"bgm",value:{src:"",enter:0,volume:100}}))},e);const n=te.getState().stage.bgm.src;te.dispatch(Ge({key:"bgm",value:{src:n,enter:-e,volume:r}}))}else clearTimeout(IP),te.dispatch(Ge({key:"bgm",value:{src:t,enter:e,volume:r}}));setTimeout(()=>{const n=document.getElementById("currentBgm");n.src&&(n==null||n.play())},0)}function Wf(t){const e=document.getElementById("ebg");e&&(e.style.backgroundImage=`url("${t}")`)}const CS=()=>{ge.warn("清除所有演出");for(let t=0;t{te.getState().stage.PerformList.forEach(e=>{ES(e.script)})},cN=(t,e=!0)=>{const r=te.dispatch,n=L.backlogManager.getBacklog()[t];ge.debug("读取的backlog数据",n),e&&ua(n.saveScene.sceneUrl).then(a=>{L.sceneManager.sceneData.currentScene=ca(a,n.saveScene.sceneName,n.saveScene.sceneUrl);const o=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(L.sceneManager.sceneData.currentScene.sceneUrl);const s=jf(o);Uf(s)}),L.sceneManager.sceneData.currentSentenceId=n.saveScene.currentSentenceId,L.sceneManager.sceneData.sceneStack=Jt(n.saveScene.sceneStack),CS();for(let a=L.backlogManager.getBacklog().length-1;a>t;a--)L.backlogManager.getBacklog().pop();L.backlogManager.isSaveBacklogNext=!0;const i=Jt(n.currentStageState);r(ov(i)),setTimeout(PS,0),r(rt({component:"showBacklog",visibility:!1})),r(rt({component:"showTextBox",visibility:!0}))},fN=t=>{const r=te.getState().saveData.saveData[t];ge.debug("读取的存档数据",r),hN(r)};function hN(t){if(!t){ge.info("暂无存档");return}const e=t;ua(e.sceneData.sceneUrl).then(a=>{L.sceneManager.sceneData.currentScene=ca(a,e.sceneData.sceneName,e.sceneData.sceneUrl);const o=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(L.sceneManager.sceneData.currentScene.sceneUrl);const s=jf(o);Uf(s)}),L.sceneManager.sceneData.currentSentenceId=e.sceneData.currentSentenceId,L.sceneManager.sceneData.sceneStack=Jt(e.sceneData.sceneStack),CS();const r=e.backlog;L.backlogManager.getBacklog().splice(0,L.backlogManager.getBacklog().length);for(const a of r)L.backlogManager.getBacklog().push(a);const n=Jt(e.nowStageState),i=te.dispatch;i(ov(n)),setTimeout(PS,0),i(rt({component:"showTitle",visibility:!1})),i(rt({component:"showMenuPanel",visibility:!1})),Wf(te.getState().stage.bgName)}function yd(t,e){for(let r=t;r<=e;r++){const n=te.getState().saveData.saveData[r];Os.setItem(`${L.gameKey}-saves${r}`,n).then(()=>{ge.info(`存档${r}写入本地存储`)})}}function Zv(t,e){for(let r=t;r<=e;r++)Os.getItem(`${L.gameKey}-saves${r}`).then(n=>{te.dispatch(Oa.saveGame({index:r,saveData:n})),ge.info(`存档${r}读取自本地存储`)})}async function _d(){const t=te.getState().saveData.quickSaveData;await Os.setItem(`${L.gameKey}-saves-fast`,t),ge.info("快速存档写入本地存储")}async function OS(){const t=await Os.getItem(`${L.gameKey}-saves-fast`);te.dispatch(Oa.setFastSave(t)),ge.info("快速存档读取自本地存储")}const p_=t=>{const e=dN(t);te.dispatch(Oa.saveGame({index:t,saveData:e})),yd(t,t)};function dN(t,e=!0){const r=te.getState().stage,n=Jt(L.backlogManager.getBacklog());let i="";if(e){const o=document.getElementById("pixiCanvas"),s=document.createElement("canvas"),u=s.getContext("2d");s.width=480,s.height=270,u.drawImage(o,0,0,480,270),i=s.toDataURL("image/webp",.5),s.remove()}return{nowStageState:Jt(r),backlog:n,index:t,saveTime:new Date().toLocaleDateString()+" "+new Date().toLocaleTimeString("chinese",{hour12:!1}),sceneData:{currentSentenceId:L.sceneManager.sceneData.currentSentenceId,sceneStack:Jt(L.sceneManager.sceneData.sceneStack),sceneName:L.sceneManager.sceneData.currentScene.sceneName,sceneUrl:L.sceneManager.sceneData.currentScene.sceneUrl},previewImage:i}}function Yae(){`${L.gameName}${L.gameKey}`,`${L.gameName}${L.gameKey}`}async function Hae(){const t=dN(-1,!1),e=Jt(t);te.dispatch(Oa.setFastSave(e)),await _d()}async function qae(){return await lN(),te.getState().saveData.quickSaveData!==null}async function Kae(){await OS();const t=te.getState().saveData.quickSaveData;t&&hN(t)}const Zae=()=>{mS(!0);const t=Nn("start.txt",Fn.scene);ua(t).then(e=>{L.sceneManager.sceneData.currentScene=ca(e,"start.txt",t),tn()}),te.dispatch(rt({component:"showTitle",visibility:!1}))};async function Qae(){if(Wf(te.getState().stage.bgName),await qae()&&L.sceneManager.sceneData.currentSentenceId===0){await Kae();return}L.sceneManager.sceneData.currentSentenceId===0&&L.sceneManager.sceneData.currentScene.sceneName==="start.txt"?tn():PS()}function RS(t,e){if(t==null)return{};var r=Cre(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var Jae={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const eoe=gn(Jae);var toe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function kP(t){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},r=t.match(/<\/?([^\s]+?)[/\s>]/);if(r&&(e.name=r[1],(eoe[r[1]]||t.charAt(t.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var n=t.indexOf("-->");return{type:"comment",comment:n!==-1?t.slice(4,n):""}}for(var i=new RegExp(toe),a=null;(a=i.exec(t))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),e.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(e.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return e}var roe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,noe=/^\s*$/,ioe=Object.create(null);function pN(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(r){var n=[];for(var i in r)n.push(i+'="'+r[i]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(pN,"")+"";case"comment":return t+""}}var aoe={parse:function(t,e){e||(e={}),e.components||(e.components=ioe);var r,n=[],i=[],a=-1,o=!1;if(t.indexOf("<")!==0){var s=t.indexOf("<");n.push({type:"text",content:s===-1?t:t.substring(0,s)})}return t.replace(roe,function(u,l){if(o){if(u!=="")return;o=!1}var c,f=u.charAt(1)!=="/",h=u.startsWith("");return{type:"comment",comment:n!==-1?t.slice(4,n):""}}for(var i=new RegExp(roe),a=null;(a=i.exec(t))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,""];o.indexOf("=")>-1&&(s=o.split("=")),e.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(e.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return e}var noe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ioe=/^\s*$/,aoe=Object.create(null);function vN(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(r){var n=[];for(var i in r)n.push(i+'="'+r[i]+'"');return n.length?" "+n.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(vN,"")+"";case"comment":return t+""}}var ooe={parse:function(t,e){e||(e={}),e.components||(e.components=aoe);var r,n=[],i=[],a=-1,o=!1;if(t.indexOf("<")!==0){var s=t.indexOf("<");n.push({type:"text",content:s===-1?t:t.substring(0,s)})}return t.replace(noe,function(u,l){if(o){if(u!=="")return;o=!1}var c,f=u.charAt(1)!=="/",h=u.startsWith(")]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(na),tw=function(t){wt(e,t);function e(r,n){var i=this;if(n=n||{},!(r instanceof HTMLVideoElement)){var a=document.createElement("video");a.setAttribute("preload","auto"),a.setAttribute("webkit-playsinline",""),a.setAttribute("playsinline",""),typeof r=="string"&&(r=[r]);var o=r[0].src||r[0];na.crossOrigin(a,o,n.crossorigin);for(var s=0;s2},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Or.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Or.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var r=this.source;r.removeEventListener("canplay",this._onCanPlay),r.removeEventListener("canplaythrough",this._onCanPlay);var n=this.valid;this.resize(r.videoWidth,r.videoHeight),!n&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&r.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&(Or.shared.remove(this.update,this),this._isConnectedToTicker=!1);var r=this.source;r&&(r.removeEventListener("error",this._onError,!0),r.pause(),r.src="",r.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(r){r!==this._autoUpdate&&(this._autoUpdate=r,!this._autoUpdate&&this._isConnectedToTicker?(Or.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Or.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(r){r!==this._updateFPS&&(this._updateFPS=r)},enumerable:!1,configurable:!0}),e.test=function(r,n){return globalThis.HTMLVideoElement&&r instanceof HTMLVideoElement||e.TYPES.indexOf(n)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(na),rw=function(t){wt(e,t);function e(r){return t.call(this,r)||this}return e.test=function(r){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&r instanceof ImageBitmap},e}(na);hf.push(um,rw,QS,tw,ew,Ms,JS,ZS);var bL={__proto__:null,Resource:_s,BaseImageResource:na,INSTALLED:hf,autoDetectResource:sm,AbstractMultiResource:lm,ArrayResource:ZS,BufferResource:Ms,CanvasResource:QS,CubeResource:JS,ImageResource:um,SVGResource:ew,VideoResource:tw,ImageBitmapResource:rw},Tpe=function(t){wt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.upload=function(r,n,i){var a=r.gl;a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===Rn.UNPACK);var o=n.realWidth,s=n.realHeight;return i.width===o&&i.height===s?a.texSubImage2D(n.target,0,0,0,o,s,n.format,i.type,this.data):(i.width=o,i.height=s,a.texImage2D(n.target,0,i.internalFormat,o,s,0,n.format,i.type,this.data)),!0},e}(Ms),xp=function(){function t(e,r){this.width=Math.round(e||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 Cr("disposeFramebuffer"),this.multisample=Ot.NONE}return Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),t.prototype.addColorTexture=function(e,r){return e===void 0&&(e=0),this.colorTextures[e]=r||new Je(null,{scaleMode:Ir.NEAREST,resolution:1,mipmap:mn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(e){return this.depthTexture=e||new Je(new Tpe(null,{width:this.width,height:this.height}),{scaleMode:Ir.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:mn.OFF,format:ve.DEPTH_COMPONENT,type:Re.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.resize=function(e,r){if(e=Math.round(e),r=Math.round(r),!(e===this.width&&r===this.height)){this.width=e,this.height=r,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&n.textureCacheIds.splice(i,1),delete wn[r],n}}else if(r&&r.textureCacheIds){for(var a=0;athis.baseTexture.width,u=i+o>this.baseTexture.height;if(s||u){var l=s&&u?"and":"or",c="X: "+n+" + "+a+" = "+(n+a)+" > "+this.baseTexture.width,f="Y: "+i+" + "+o+" = "+(i+o)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+(c+" "+l+" "+f))}this.valid=a&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=r),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(r){this._rotate=r,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(e,"EMPTY",{get:function(){return e._EMPTY||(e._EMPTY=new e(new Je),Oh(e._EMPTY),Oh(e._EMPTY.baseTexture)),e._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(e,"WHITE",{get:function(){if(!e._WHITE){var r=xe.ADAPTER.createCanvas(16,16),n=r.getContext("2d");r.width=16,r.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),e._WHITE=new e(Je.from(r)),Oh(e._WHITE),Oh(e._WHITE.baseTexture)}return e._WHITE},enumerable:!1,configurable:!0}),e}(mu),Co=function(t){wt(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(r){this.framebuffer.multisample=r},enumerable:!1,configurable:!0}),e.prototype.resize=function(r,n,i){i===void 0&&(i=!0);var a=this.baseTexture.resolution,o=Math.round(r*a)/a,s=Math.round(n*a)/a;this.valid=o>0&&s>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=s,i&&this.baseTexture.resize(o,s),this.updateUvs()},e.prototype.setResolution=function(r){var n=this.baseTexture;n.resolution!==r&&(n.setResolution(r),this.resize(n.width,n.height,!1))},e.create=function(r){for(var n=arguments,i=[],a=1;a>>0,i>1&&(a+=i*4294967296)):a=i>1?-i:-1,this.texturePool[a]||(this.texturePool[a]=[]);var o=this.texturePool[a].pop();return o||(o=this.createTexture(e,r,i)),o.filterPoolKey=a,o.setResolution(n),o},t.prototype.getFilterTexture=function(e,r,n){var i=this.getOptimalTexture(e.width,e.height,r||e.resolution,n||Ot.NONE);return i.filterFrame=e.filterFrame,i},t.prototype.returnTexture=function(e){var r=e.filterPoolKey;e.filterFrame=null,this.texturePool[r].push(e)},t.prototype.returnFilterTexture=function(e){this.returnTexture(e)},t.prototype.clear=function(e){if(e=e!==!1,e)for(var r in this.texturePool){var n=this.texturePool[r];if(n)for(var i=0;i0&&e.height>0;for(var r in this.texturePool)if(Number(r)<0){var n=this.texturePool[r];if(n)for(var i=0;i1){for(var c=0;c1&&(f=this.getOptimalFilterTexture(c.width,c.height,r.resolution),f.filterFrame=c.filterFrame),n[h].apply(this,c,f,qn.CLEAR,r);var d=c;c=f,f=d}n[h].apply(this,c,l.renderTexture,qn.BLEND,r),h>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(f)}r.clear(),this.statePool.push(r)},t.prototype.bindAndClear=function(e,r){r===void 0&&(r=qn.CLEAR);var n=this.renderer,i=n.renderTexture,a=n.state;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e&&e.filterFrame){var o=this.tempRect;o.x=0,o.y=0,o.width=e.filterFrame.width,o.height=e.filterFrame.height,i.bind(e,e.filterFrame,o)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var s=a.stateId&1||this.forceClear;(r===qn.CLEAR||r===qn.BLIT&&s)&&this.renderer.framebuffer.clear(0,0,0,0)},t.prototype.applyFilter=function(e,r,n,i){var a=this.renderer;a.state.set(e.state),this.bindAndClear(n,i),e.uniforms.uSampler=r,e.uniforms.filterGlobals=this.globalUniforms,a.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(r._frame,r.filterFrame),a.geometry.bind(this.quadUv),a.geometry.draw(Ln.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(Ln.TRIANGLE_STRIP))},t.prototype.calculateSpriteMatrix=function(e,r){var n=this.activeState,i=n.sourceFrame,a=n.destinationFrame,o=r._texture.orig,s=e.set(a.width,0,0,a.height,i.x,i.y),u=r.worldTransform.copyTo(Ut.TEMP_MATRIX);return u.invert(),s.prepend(u),s.scale(1/o.width,1/o.height),s.translate(r.anchor.x,r.anchor.y),s},t.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},t.prototype.getOptimalFilterTexture=function(e,r,n,i){return n===void 0&&(n=1),i===void 0&&(i=Ot.NONE),this.texturePool.getOptimalTexture(e,r,n,i)},t.prototype.getFilterTexture=function(e,r,n){if(typeof e=="number"){var i=e;e=r,r=i}e=e||this.activeState.renderTexture;var a=this.texturePool.getOptimalTexture(e.width,e.height,r||e.resolution,n||Ot.NONE);return a.filterFrame=e.filterFrame,a},t.prototype.returnFilterTexture=function(e){this.texturePool.returnTexture(e)},t.prototype.emptyPool=function(){this.texturePool.clear(!0)},t.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},t.prototype.transformAABB=function(e,r){var n=Rh[0],i=Rh[1],a=Rh[2],o=Rh[3];n.set(r.left,r.top),i.set(r.left,r.bottom),a.set(r.right,r.top),o.set(r.right,r.bottom),e.apply(n,n),e.apply(i,i),e.apply(a,a),e.apply(o,o);var s=Math.min(n.x,i.x,a.x,o.x),u=Math.min(n.y,i.y,a.y,o.y),l=Math.max(n.x,i.x,a.x,o.x),c=Math.max(n.y,i.y,a.y,o.y);r.x=s,r.y=u,r.width=l-s,r.height=c-u},t.prototype.roundFrame=function(e,r,n,i,a){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(a){var o=a.a,s=a.b,u=a.c,l=a.d;if((Math.abs(s)>1e-4||Math.abs(u)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(l)>1e-4))return}a=a?xy.copyFrom(a):xy.identity(),a.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(a,e),e.ceil(r),this.transformAABB(a.invert(),e)}},t}(),qf=function(){function t(e){this.renderer=e}return t.prototype.flush=function(){},t.prototype.destroy=function(){this.renderer=null},t.prototype.start=function(){},t.prototype.stop=function(){this.flush()},t.prototype.render=function(e){},t}(),sw=function(){function t(e){this.renderer=e,this.emptyRenderer=new qf(e),this.currentRenderer=this.emptyRenderer}return t.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},t.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.copyBoundTextures=function(e,r){for(var n=this.renderer.texture.boundTextures,i=r-1;i>=0;--i)e[i]=n[i]||null,e[i]&&(e[i]._batchLocation=i)},t.prototype.boundArray=function(e,r,n,i){for(var a=e.elements,o=e.ids,s=e.count,u=0,l=0;l=0&&f=ta.WEBGL2&&(n=e.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext("webgl",r)||e.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},t.prototype.getExtensions=function(){var e=this.gl,r={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})},t.prototype.handleContextLost=function(e){var r=this;e.preventDefault(),setTimeout(function(){r.gl.isContextLost()&&r.extensions.loseContext&&r.extensions.loseContext.restoreContext()},0)},t.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},t.prototype.destroy=function(){var e=this.renderer.view;this.renderer=null,e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},t.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},t.prototype.validateContext=function(e){var r=e.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&e 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");var i=n||!!e.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")},t}(),TL=function(){function t(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Ot.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return t}(),kpe=new Ye,uw=function(){function t(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new xp(10,10),this.msaaSamples=null}return t.prototype.contextChange=function(){this.disposeAll(!0);var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Ye,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;xe.PREFER_ENV===ta.WEBGL_LEGACY&&(r=null,n=null),r?e.drawBuffers=function(i){return r.drawBuffersWEBGL(i)}:(this.hasMRT=!1,e.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},t.prototype.bind=function(e,r,n){n===void 0&&(n=0);var i=this.gl;if(e){var a=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,i.bindFramebuffer(i.FRAMEBUFFER,a.framebuffer)),a.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,a.mipLevel=n),a.dirtyId!==e.dirtyId&&(a.dirtyId=e.dirtyId,a.dirtyFormat!==e.dirtyFormat?(a.dirtyFormat=e.dirtyFormat,a.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)):a.dirtySize!==e.dirtySize&&(a.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(var o=0;o>n,l=r.height>>n,c=u/r.width;this.setViewport(r.x*c,r.y*c,u,l)}else{var u=e.width>>n,l=e.height>>n;this.setViewport(0,0,u,l)}}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)},t.prototype.setViewport=function(e,r,n,i){var a=this.viewport;e=Math.round(e),r=Math.round(r),n=Math.round(n),i=Math.round(i),(a.width!==n||a.height!==i||a.x!==e||a.y!==r)&&(a.x=e,a.y=r,a.width=n,a.height=i,this.gl.viewport(e,r,n,i))},Object.defineProperty(t.prototype,"size",{get:function(){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}},enumerable:!1,configurable:!0}),t.prototype.clear=function(e,r,n,i,a){a===void 0&&(a=tf.COLOR|tf.DEPTH);var o=this.gl;o.clearColor(e,r,n,i),o.clear(a)},t.prototype.initFramebuffer=function(e){var r=this.gl,n=new TL(r.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n},t.prototype.resizeFramebuffer=function(e){var r=this.gl,n=e.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.RGBA8,e.width,e.height)),n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,e.width,e.height));var i=e.colorTextures,a=i.length;r.drawBuffers||(a=Math.min(a,1));for(var o=0;o1&&this.canMultisampleFramebuffer(e)?(i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.RGBA8,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));for(var s=[],u=0;u1&&n.drawBuffers(s),e.depthTexture){var f=this.writeDepthTexture;if(f){var h=e.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}}(e.stencil||e.depth)&&!(e.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,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)},t.prototype.canMultisampleFramebuffer=function(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture},t.prototype.detectSamples=function(e){var r=this.msaaSamples,n=Ot.NONE;if(e<=1||r===null)return n;for(var i=0;i=0&&this.managedFramebuffers.splice(a,1),e.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},t.prototype.disposeAll=function(e){var r=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n0&&c>0,i.textureCacheIds=[],i.destroyed=!1,i.resource=null,i._batchEnabled=0,i._batchLocation=0,i.parentTextureArray=null,i.setResource(r),i}return Object.defineProperty(e.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mipmap",{get:function(){return this._mipmap},set:function(r){this._mipmap!==r&&(this._mipmap=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(r){this._scaleMode!==r&&(this._scaleMode=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(r){this._wrapMode!==r&&(this._wrapMode=r,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),e.prototype.setStyle=function(r,n){var i;return r!==void 0&&r!==this.scaleMode&&(this.scaleMode=r,i=!0),n!==void 0&&n!==this.mipmap&&(this.mipmap=n,i=!0),i&&this.dirtyStyleId++,this},e.prototype.setSize=function(r,n,i){return i=i||this.resolution,this.setRealSize(r*i,n*i,i)},e.prototype.setRealSize=function(r,n,i){return this.resolution=i||this.resolution,this.width=Math.round(r)/this.resolution,this.height=Math.round(n)/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=N_(this.realWidth)&&N_(this.realHeight)},e.prototype.setResolution=function(r){var n=this.resolution;return n===r?this:(this.resolution=r,this.valid&&(this.width=Math.round(this.width*n)/r,this.height=Math.round(this.height*n)/r,this.emit("update",this)),this._refreshPOT(),this)},e.prototype.setResource=function(r){if(this.resource===r)return this;if(this.resource)throw new Error("Resource can be set only once");return r.bind(this),this.resource=r,this},e.prototype.update=function(){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))},e.prototype.onError=function(r){this.emit("error",this,r)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Yn[this.cacheId],delete wn[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.castToBaseTexture=function(){return this},e.from=function(r,n,i){i===void 0&&(i=xe.STRICT_TEXTURE_CACHE);var a=typeof r=="string",o=null;if(a)o=r;else{if(!r._pixiId){var s=n&&n.pixiIdPrefix||"pixiid";r._pixiId=s+"_"+To()}o=r._pixiId}var u=Yn[o];if(a&&i&&!u)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return u||(u=new e(r,n),u.cacheId=o,e.addToCache(u,o)),u},e.fromBuffer=function(r,n,i,a){r=r||new Float32Array(n*i*4);var o=new Ms(r,{width:n,height:i}),s=r instanceof Float32Array?Re.FLOAT:Re.UNSIGNED_BYTE;return new e(o,Object.assign({},Tpe,a||{width:n,height:i,type:s}))},e.addToCache=function(r,n){n&&(r.textureCacheIds.indexOf(n)===-1&&r.textureCacheIds.push(n),Yn[n]&&console.warn("BaseTexture added to the cache with an id ["+n+"] that already had an entry"),Yn[n]=r)},e.removeFromCache=function(r){if(typeof r=="string"){var n=Yn[r];if(n){var i=n.textureCacheIds.indexOf(r);return i>-1&&n.textureCacheIds.splice(i,1),delete Yn[r],n}}else if(r&&r.textureCacheIds){for(var a=0;a0)if(r.resource)this.addResourceAt(r.resource,n);else throw new Error("CubeResource does not support copying of renderTexture.");else r.target=vo.TEXTURE_CUBE_MAP_POSITIVE_X+n,r.parentTextureArray=this.baseTexture,this.items[n]=r;return r.valid&&!this.valid&&this.resize(r.realWidth,r.realHeight),this.items[n]=r,this},e.prototype.upload=function(r,n,i){for(var a=this.itemDirtyIds,o=0;o)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(na),rw=function(t){wt(e,t);function e(r,n){var i=this;if(n=n||{},!(r instanceof HTMLVideoElement)){var a=document.createElement("video");a.setAttribute("preload","auto"),a.setAttribute("webkit-playsinline",""),a.setAttribute("playsinline",""),typeof r=="string"&&(r=[r]);var o=r[0].src||r[0];na.crossOrigin(a,o,n.crossorigin);for(var s=0;s2},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Or.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Or.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var r=this.source;r.removeEventListener("canplay",this._onCanPlay),r.removeEventListener("canplaythrough",this._onCanPlay);var n=this.valid;this.resize(r.videoWidth,r.videoHeight),!n&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&r.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&(Or.shared.remove(this.update,this),this._isConnectedToTicker=!1);var r=this.source;r&&(r.removeEventListener("error",this._onError,!0),r.pause(),r.src="",r.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(r){r!==this._autoUpdate&&(this._autoUpdate=r,!this._autoUpdate&&this._isConnectedToTicker?(Or.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Or.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(r){r!==this._updateFPS&&(this._updateFPS=r)},enumerable:!1,configurable:!0}),e.test=function(r,n){return globalThis.HTMLVideoElement&&r instanceof HTMLVideoElement||e.TYPES.indexOf(n)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(na),nw=function(t){wt(e,t);function e(r){return t.call(this,r)||this}return e.test=function(r){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&r instanceof ImageBitmap},e}(na);hf.push(um,nw,JS,rw,tw,Ms,ew,QS);var SL={__proto__:null,Resource:_s,BaseImageResource:na,INSTALLED:hf,autoDetectResource:sm,AbstractMultiResource:lm,ArrayResource:QS,BufferResource:Ms,CanvasResource:JS,CubeResource:ew,ImageResource:um,SVGResource:tw,VideoResource:rw,ImageBitmapResource:nw},Ape=function(t){wt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.upload=function(r,n,i){var a=r.gl;a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.alphaMode===Rn.UNPACK);var o=n.realWidth,s=n.realHeight;return i.width===o&&i.height===s?a.texSubImage2D(n.target,0,0,0,o,s,n.format,i.type,this.data):(i.width=o,i.height=s,a.texImage2D(n.target,0,i.internalFormat,o,s,0,n.format,i.type,this.data)),!0},e}(Ms),xp=function(){function t(e,r){this.width=Math.round(e||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 Cr("disposeFramebuffer"),this.multisample=Ot.NONE}return Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),t.prototype.addColorTexture=function(e,r){return e===void 0&&(e=0),this.colorTextures[e]=r||new Je(null,{scaleMode:Ir.NEAREST,resolution:1,mipmap:mn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(e){return this.depthTexture=e||new Je(new Ape(null,{width:this.width,height:this.height}),{scaleMode:Ir.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:mn.OFF,format:ve.DEPTH_COMPONENT,type:Re.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.resize=function(e,r){if(e=Math.round(e),r=Math.round(r),!(e===this.width&&r===this.height)){this.width=e,this.height=r,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&n.textureCacheIds.splice(i,1),delete wn[r],n}}else if(r&&r.textureCacheIds){for(var a=0;athis.baseTexture.width,u=i+o>this.baseTexture.height;if(s||u){var l=s&&u?"and":"or",c="X: "+n+" + "+a+" = "+(n+a)+" > "+this.baseTexture.width,f="Y: "+i+" + "+o+" = "+(i+o)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+(c+" "+l+" "+f))}this.valid=a&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=r),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(r){this._rotate=r,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(e,"EMPTY",{get:function(){return e._EMPTY||(e._EMPTY=new e(new Je),Oh(e._EMPTY),Oh(e._EMPTY.baseTexture)),e._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(e,"WHITE",{get:function(){if(!e._WHITE){var r=xe.ADAPTER.createCanvas(16,16),n=r.getContext("2d");r.width=16,r.height=16,n.fillStyle="white",n.fillRect(0,0,16,16),e._WHITE=new e(Je.from(r)),Oh(e._WHITE),Oh(e._WHITE.baseTexture)}return e._WHITE},enumerable:!1,configurable:!0}),e}(mu),Co=function(t){wt(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(r){this.framebuffer.multisample=r},enumerable:!1,configurable:!0}),e.prototype.resize=function(r,n,i){i===void 0&&(i=!0);var a=this.baseTexture.resolution,o=Math.round(r*a)/a,s=Math.round(n*a)/a;this.valid=o>0&&s>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=s,i&&this.baseTexture.resize(o,s),this.updateUvs()},e.prototype.setResolution=function(r){var n=this.baseTexture;n.resolution!==r&&(n.setResolution(r),this.resize(n.width,n.height,!1))},e.create=function(r){for(var n=arguments,i=[],a=1;a>>0,i>1&&(a+=i*4294967296)):a=i>1?-i:-1,this.texturePool[a]||(this.texturePool[a]=[]);var o=this.texturePool[a].pop();return o||(o=this.createTexture(e,r,i)),o.filterPoolKey=a,o.setResolution(n),o},t.prototype.getFilterTexture=function(e,r,n){var i=this.getOptimalTexture(e.width,e.height,r||e.resolution,n||Ot.NONE);return i.filterFrame=e.filterFrame,i},t.prototype.returnTexture=function(e){var r=e.filterPoolKey;e.filterFrame=null,this.texturePool[r].push(e)},t.prototype.returnFilterTexture=function(e){this.returnTexture(e)},t.prototype.clear=function(e){if(e=e!==!1,e)for(var r in this.texturePool){var n=this.texturePool[r];if(n)for(var i=0;i0&&e.height>0;for(var r in this.texturePool)if(Number(r)<0){var n=this.texturePool[r];if(n)for(var i=0;i1){for(var c=0;c1&&(f=this.getOptimalFilterTexture(c.width,c.height,r.resolution),f.filterFrame=c.filterFrame),n[h].apply(this,c,f,qn.CLEAR,r);var d=c;c=f,f=d}n[h].apply(this,c,l.renderTexture,qn.BLEND,r),h>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(f)}r.clear(),this.statePool.push(r)},t.prototype.bindAndClear=function(e,r){r===void 0&&(r=qn.CLEAR);var n=this.renderer,i=n.renderTexture,a=n.state;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e&&e.filterFrame){var o=this.tempRect;o.x=0,o.y=0,o.width=e.filterFrame.width,o.height=e.filterFrame.height,i.bind(e,e.filterFrame,o)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var s=a.stateId&1||this.forceClear;(r===qn.CLEAR||r===qn.BLIT&&s)&&this.renderer.framebuffer.clear(0,0,0,0)},t.prototype.applyFilter=function(e,r,n,i){var a=this.renderer;a.state.set(e.state),this.bindAndClear(n,i),e.uniforms.uSampler=r,e.uniforms.filterGlobals=this.globalUniforms,a.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(r._frame,r.filterFrame),a.geometry.bind(this.quadUv),a.geometry.draw(Ln.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(Ln.TRIANGLE_STRIP))},t.prototype.calculateSpriteMatrix=function(e,r){var n=this.activeState,i=n.sourceFrame,a=n.destinationFrame,o=r._texture.orig,s=e.set(a.width,0,0,a.height,i.x,i.y),u=r.worldTransform.copyTo(Ut.TEMP_MATRIX);return u.invert(),s.prepend(u),s.scale(1/o.width,1/o.height),s.translate(r.anchor.x,r.anchor.y),s},t.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},t.prototype.getOptimalFilterTexture=function(e,r,n,i){return n===void 0&&(n=1),i===void 0&&(i=Ot.NONE),this.texturePool.getOptimalTexture(e,r,n,i)},t.prototype.getFilterTexture=function(e,r,n){if(typeof e=="number"){var i=e;e=r,r=i}e=e||this.activeState.renderTexture;var a=this.texturePool.getOptimalTexture(e.width,e.height,r||e.resolution,n||Ot.NONE);return a.filterFrame=e.filterFrame,a},t.prototype.returnFilterTexture=function(e){this.texturePool.returnTexture(e)},t.prototype.emptyPool=function(){this.texturePool.clear(!0)},t.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},t.prototype.transformAABB=function(e,r){var n=Rh[0],i=Rh[1],a=Rh[2],o=Rh[3];n.set(r.left,r.top),i.set(r.left,r.bottom),a.set(r.right,r.top),o.set(r.right,r.bottom),e.apply(n,n),e.apply(i,i),e.apply(a,a),e.apply(o,o);var s=Math.min(n.x,i.x,a.x,o.x),u=Math.min(n.y,i.y,a.y,o.y),l=Math.max(n.x,i.x,a.x,o.x),c=Math.max(n.y,i.y,a.y,o.y);r.x=s,r.y=u,r.width=l-s,r.height=c-u},t.prototype.roundFrame=function(e,r,n,i,a){if(!(e.width<=0||e.height<=0||n.width<=0||n.height<=0)){if(a){var o=a.a,s=a.b,u=a.c,l=a.d;if((Math.abs(s)>1e-4||Math.abs(u)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(l)>1e-4))return}a=a?xy.copyFrom(a):xy.identity(),a.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(a,e),e.ceil(r),this.transformAABB(a.invert(),e)}},t}(),qf=function(){function t(e){this.renderer=e}return t.prototype.flush=function(){},t.prototype.destroy=function(){this.renderer=null},t.prototype.start=function(){},t.prototype.stop=function(){this.flush()},t.prototype.render=function(e){},t}(),lw=function(){function t(e){this.renderer=e,this.emptyRenderer=new qf(e),this.currentRenderer=this.emptyRenderer}return t.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},t.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.copyBoundTextures=function(e,r){for(var n=this.renderer.texture.boundTextures,i=r-1;i>=0;--i)e[i]=n[i]||null,e[i]&&(e[i]._batchLocation=i)},t.prototype.boundArray=function(e,r,n,i){for(var a=e.elements,o=e.ids,s=e.count,u=0,l=0;l=0&&f=ta.WEBGL2&&(n=e.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=e.getContext("webgl",r)||e.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},t.prototype.getExtensions=function(){var e=this.gl,r={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})},t.prototype.handleContextLost=function(e){var r=this;e.preventDefault(),setTimeout(function(){r.gl.isContextLost()&&r.extensions.loseContext&&r.extensions.loseContext.restoreContext()},0)},t.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},t.prototype.destroy=function(){var e=this.renderer.view;this.renderer=null,e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},t.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},t.prototype.validateContext=function(e){var r=e.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&e 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");var i=n||!!e.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")},t}(),AL=function(){function t(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Ot.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return t}(),Mpe=new Ye,cw=function(){function t(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new xp(10,10),this.msaaSamples=null}return t.prototype.contextChange=function(){this.disposeAll(!0);var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Ye,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){var r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;xe.PREFER_ENV===ta.WEBGL_LEGACY&&(r=null,n=null),r?e.drawBuffers=function(i){return r.drawBuffersWEBGL(i)}:(this.hasMRT=!1,e.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},t.prototype.bind=function(e,r,n){n===void 0&&(n=0);var i=this.gl;if(e){var a=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,i.bindFramebuffer(i.FRAMEBUFFER,a.framebuffer)),a.mipLevel!==n&&(e.dirtyId++,e.dirtyFormat++,a.mipLevel=n),a.dirtyId!==e.dirtyId&&(a.dirtyId=e.dirtyId,a.dirtyFormat!==e.dirtyFormat?(a.dirtyFormat=e.dirtyFormat,a.dirtySize=e.dirtySize,this.updateFramebuffer(e,n)):a.dirtySize!==e.dirtySize&&(a.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(var o=0;o>n,l=r.height>>n,c=u/r.width;this.setViewport(r.x*c,r.y*c,u,l)}else{var u=e.width>>n,l=e.height>>n;this.setViewport(0,0,u,l)}}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)},t.prototype.setViewport=function(e,r,n,i){var a=this.viewport;e=Math.round(e),r=Math.round(r),n=Math.round(n),i=Math.round(i),(a.width!==n||a.height!==i||a.x!==e||a.y!==r)&&(a.x=e,a.y=r,a.width=n,a.height=i,this.gl.viewport(e,r,n,i))},Object.defineProperty(t.prototype,"size",{get:function(){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}},enumerable:!1,configurable:!0}),t.prototype.clear=function(e,r,n,i,a){a===void 0&&(a=tf.COLOR|tf.DEPTH);var o=this.gl;o.clearColor(e,r,n,i),o.clear(a)},t.prototype.initFramebuffer=function(e){var r=this.gl,n=new AL(r.createFramebuffer());return n.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(e),e.disposeRunner.add(this),n},t.prototype.resizeFramebuffer=function(e){var r=this.gl,n=e.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.RGBA8,e.width,e.height)),n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,e.width,e.height));var i=e.colorTextures,a=i.length;r.drawBuffers||(a=Math.min(a,1));for(var o=0;o1&&this.canMultisampleFramebuffer(e)?(i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.RGBA8,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));for(var s=[],u=0;u1&&n.drawBuffers(s),e.depthTexture){var f=this.writeDepthTexture;if(f){var h=e.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}}(e.stencil||e.depth)&&!(e.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,e.width,e.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e.width,e.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)},t.prototype.canMultisampleFramebuffer=function(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture},t.prototype.detectSamples=function(e){var r=this.msaaSamples,n=Ot.NONE;if(e<=1||r===null)return n;for(var i=0;i=0&&this.managedFramebuffers.splice(a,1),e.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},t.prototype.disposeAll=function(e){var r=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=ta.WEBGL2&&(e=t.getContext("webgl2",{})),e||(e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Vu=e}return Vu}var Ih;function Fpe(){if(!Ih){Ih=Tn.MEDIUM;var t=OL();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);Ih=e.precision?Tn.HIGH:Tn.MEDIUM}}return Ih}function U2(t,e,r){if(t.substring(0,9)!=="precision"){var n=e;return e===Tn.HIGH&&r!==Tn.HIGH&&(n=Tn.MEDIUM),"precision "+n+` float; -`+t}else if(r!==Tn.HIGH&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}var Npe={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 RL(t){return Npe[t]}var kh=null,$2={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 IL(t,e){if(!kh){var r=Object.keys($2);kh={};for(var n=0;n=ta.WEBGL2&&(e=t.getContext("webgl2",{})),e||(e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Vu=e}return Vu}var Ih;function Npe(){if(!Ih){Ih=Tn.MEDIUM;var t=RL();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);Ih=e.precision?Tn.HIGH:Tn.MEDIUM}}return Ih}function $2(t,e,r){if(t.substring(0,9)!=="precision"){var n=e;return e===Tn.HIGH&&r!==Tn.HIGH&&(n=Tn.MEDIUM),"precision "+n+` float; +`+t}else if(r!==Tn.HIGH&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}var Lpe={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 IL(t){return Lpe[t]}var kh=null,V2={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 kL(t,e){if(!kh){var r=Object.keys(V2);kh={};for(var n=0;n0&&(e+=` -else `),r0&&(e+=` +else `),r"u"?.5:r,this.isSimple=!1}return Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(e){this._texture=e,this._textureID=-1},enumerable:!1,configurable:!0}),t.prototype.multiplyUvs=function(e,r){r===void 0&&(r=e);for(var n=this.mapCoord,i=0;i0?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)},t.prototype.destroy=function(){this.renderer=null},t}(),FL=function(){function t(e){this.renderer=e,this.maskStack=[],this.glConst=0}return t.prototype.getStackLength=function(){return this.maskStack.length},t.prototype.setMaskStack=function(e){var r=this.renderer.gl,n=this.getStackLength();this.maskStack=e;var i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))},t.prototype._useCurrent=function(){},t.prototype.destroy=function(){this.renderer=null,this.maskStack=null},t}(),G2=new Ut,X2=[],hw=function(t){wt(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=xe.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST,n}return e.prototype.getStackLength=function(){var r=this.maskStack[this.maskStack.length-1];return r?r._scissorCounter:0},e.prototype.calcScissorRect=function(r){var n;if(!r._scissorRectLocal){var i=r._scissorRect,a=r.maskObject,o=this.renderer,s=o.renderTexture,u=a.getBounds(!0,(n=X2.pop())!==null&&n!==void 0?n:new Ye);this.roundFrameToPixels(u,s.current?s.current.resolution:o.resolution,s.sourceFrame,s.destinationFrame,o.projection.transform),i&&u.fit(i),r._scissorRectLocal=u}},e.isMatrixRotated=function(r){if(!r)return!1;var n=r.a,i=r.b,a=r.c,o=r.d;return(Math.abs(i)>1e-4||Math.abs(a)>1e-4)&&(Math.abs(n)>1e-4||Math.abs(o)>1e-4)},e.prototype.testScissor=function(r){var n=r.maskObject;if(!n.isFastRect||!n.isFastRect()||e.isMatrixRotated(n.worldTransform)||e.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(r);var i=r._scissorRectLocal;return i.width>0&&i.height>0},e.prototype.roundFrameToPixels=function(r,n,i,a,o){e.isMatrixRotated(o)||(o=o?G2.copyFrom(o):G2.identity(),o.translate(-i.x,-i.y).scale(a.width/i.width,a.height/i.height).translate(a.x,a.y),this.renderer.filter.transformAABB(o,r),r.fit(a),r.x=Math.round(r.x*n),r.y=Math.round(r.y*n),r.width=Math.round(r.width*n),r.height=Math.round(r.height*n))},e.prototype.push=function(r){r._scissorRectLocal||this.calcScissorRect(r);var n=this.renderer.gl;r._scissorRect||n.enable(n.SCISSOR_TEST),r._scissorCounter++,r._scissorRect=r._scissorRectLocal,this._useCurrent()},e.prototype.pop=function(r){var n=this.renderer.gl;r&&X2.push(r._scissorRectLocal),this.getStackLength()>0?this._useCurrent():n.disable(n.SCISSOR_TEST)},e.prototype._useCurrent=function(){var r=this.maskStack[this.maskStack.length-1]._scissorRect,n;this.renderer.renderTexture.current?n=r.y:n=this.renderer.height-r.height-r.y,this.renderer.gl.scissor(r.x,n,r.width,r.height)},e}(FL),dw=function(t){wt(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=xe.ADAPTER.getWebGLRenderingContext().STENCIL_TEST,n}return e.prototype.getStackLength=function(){var r=this.maskStack[this.maskStack.length-1];return r?r._stencilCounter:0},e.prototype.push=function(r){var n=r.maskObject,i=this.renderer.gl,a=r._stencilCounter;a===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),r._stencilCounter++;var o=r._colorMask;o!==0&&(r._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,a,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),n.renderable=!0,n.render(this.renderer),this.renderer.batch.flush(),n.renderable=!1,o!==0&&(r._colorMask=o,i.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()},e.prototype.pop=function(r){var n=this.renderer.gl;if(this.getStackLength()===0)n.disable(n.STENCIL_TEST);else{var i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,a=i?i._colorMask:15;a!==0&&(i._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilOp(n.KEEP,n.KEEP,n.DECR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,a!==0&&(i._colorMask=a,n.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()}},e.prototype._useCurrent=function(){var r=this.renderer.gl;r.stencilFunc(r.EQUAL,this.getStackLength(),4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP)},e}(FL),pw=function(){function t(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Ut,this.transform=null}return t.prototype.update=function(e,r,n,i){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);var a=this.renderer;a.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,a.globalUniforms.update(),a.shader.shader&&a.shader.syncUniformGroup(a.shader.shader.uniforms.globals)},t.prototype.calculateProjection=function(e,r,n,i){var a=this.projectionMatrix,o=i?-1:1;a.identity(),a.a=1/r.width*2,a.d=o*(1/r.height*2),a.tx=-1-r.x*a.a,a.ty=-o-r.y*a.d},t.prototype.setTransform=function(e){},t.prototype.destroy=function(){this.renderer=null},t}(),Lo=new Ye,Xu=new Ye,vw=function(){function t(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Ye,this.destinationFrame=new Ye,this.viewportFrame=new Ye}return t.prototype.bind=function(e,r,n){e===void 0&&(e=null);var i=this.renderer;this.current=e;var a,o,s;e?(a=e.baseTexture,s=a.resolution,r||(Lo.width=e.frame.width,Lo.height=e.frame.height,r=Lo),n||(Xu.x=e.frame.x,Xu.y=e.frame.y,Xu.width=r.width,Xu.height=r.height,n=Xu),o=a.framebuffer):(s=i.resolution,r||(Lo.width=i.screen.width,Lo.height=i.screen.height,r=Lo),n||(n=Lo,n.width=r.width,n.height=r.height));var u=this.viewportFrame;u.x=n.x*s,u.y=n.y*s,u.width=n.width*s,u.height=n.height*s,e||(u.y=i.view.height-(u.y+u.height)),u.ceil(),this.renderer.framebuffer.bind(o,u),this.renderer.projection.update(n,r,s,!o),e?this.renderer.mask.setMaskStack(a.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)},t.prototype.clear=function(e,r){this.current?e=e||this.current.baseTexture.clearColor:e=e||this.clearColor;var n=this.destinationFrame,i=this.current?this.current.baseTexture:this.renderer.screen,a=n.width!==i.width||n.height!==i.height;if(a){var o=this.viewportFrame,s=o.x,u=o.y,l=o.width,c=o.height;s=Math.round(s),u=Math.round(u),l=Math.round(l),c=Math.round(c),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(s,u,l,c)}this.renderer.framebuffer.clear(e[0],e[1],e[2],e[3],r),a&&this.renderer.scissor.pop()},t.prototype.resize=function(){this.bind(null)},t.prototype.reset=function(){this.bind(null)},t.prototype.destroy=function(){this.renderer=null},t}();function qpe(t,e,r,n,i){r.buffer.update(i)}var Kpe={float:` +`,G2=new Ut,cm=function(){function t(e,r){this._texture=e,this.mapCoord=new Ut,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}return Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(e){this._texture=e,this._textureID=-1},enumerable:!1,configurable:!0}),t.prototype.multiplyUvs=function(e,r){r===void 0&&(r=e);for(var n=this.mapCoord,i=0;i0?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)},t.prototype.destroy=function(){this.renderer=null},t}(),NL=function(){function t(e){this.renderer=e,this.maskStack=[],this.glConst=0}return t.prototype.getStackLength=function(){return this.maskStack.length},t.prototype.setMaskStack=function(e){var r=this.renderer.gl,n=this.getStackLength();this.maskStack=e;var i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))},t.prototype._useCurrent=function(){},t.prototype.destroy=function(){this.renderer=null,this.maskStack=null},t}(),X2=new Ut,z2=[],dw=function(t){wt(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=xe.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST,n}return e.prototype.getStackLength=function(){var r=this.maskStack[this.maskStack.length-1];return r?r._scissorCounter:0},e.prototype.calcScissorRect=function(r){var n;if(!r._scissorRectLocal){var i=r._scissorRect,a=r.maskObject,o=this.renderer,s=o.renderTexture,u=a.getBounds(!0,(n=z2.pop())!==null&&n!==void 0?n:new Ye);this.roundFrameToPixels(u,s.current?s.current.resolution:o.resolution,s.sourceFrame,s.destinationFrame,o.projection.transform),i&&u.fit(i),r._scissorRectLocal=u}},e.isMatrixRotated=function(r){if(!r)return!1;var n=r.a,i=r.b,a=r.c,o=r.d;return(Math.abs(i)>1e-4||Math.abs(a)>1e-4)&&(Math.abs(n)>1e-4||Math.abs(o)>1e-4)},e.prototype.testScissor=function(r){var n=r.maskObject;if(!n.isFastRect||!n.isFastRect()||e.isMatrixRotated(n.worldTransform)||e.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(r);var i=r._scissorRectLocal;return i.width>0&&i.height>0},e.prototype.roundFrameToPixels=function(r,n,i,a,o){e.isMatrixRotated(o)||(o=o?X2.copyFrom(o):X2.identity(),o.translate(-i.x,-i.y).scale(a.width/i.width,a.height/i.height).translate(a.x,a.y),this.renderer.filter.transformAABB(o,r),r.fit(a),r.x=Math.round(r.x*n),r.y=Math.round(r.y*n),r.width=Math.round(r.width*n),r.height=Math.round(r.height*n))},e.prototype.push=function(r){r._scissorRectLocal||this.calcScissorRect(r);var n=this.renderer.gl;r._scissorRect||n.enable(n.SCISSOR_TEST),r._scissorCounter++,r._scissorRect=r._scissorRectLocal,this._useCurrent()},e.prototype.pop=function(r){var n=this.renderer.gl;r&&z2.push(r._scissorRectLocal),this.getStackLength()>0?this._useCurrent():n.disable(n.SCISSOR_TEST)},e.prototype._useCurrent=function(){var r=this.maskStack[this.maskStack.length-1]._scissorRect,n;this.renderer.renderTexture.current?n=r.y:n=this.renderer.height-r.height-r.y,this.renderer.gl.scissor(r.x,n,r.width,r.height)},e}(NL),pw=function(t){wt(e,t);function e(r){var n=t.call(this,r)||this;return n.glConst=xe.ADAPTER.getWebGLRenderingContext().STENCIL_TEST,n}return e.prototype.getStackLength=function(){var r=this.maskStack[this.maskStack.length-1];return r?r._stencilCounter:0},e.prototype.push=function(r){var n=r.maskObject,i=this.renderer.gl,a=r._stencilCounter;a===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),r._stencilCounter++;var o=r._colorMask;o!==0&&(r._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,a,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),n.renderable=!0,n.render(this.renderer),this.renderer.batch.flush(),n.renderable=!1,o!==0&&(r._colorMask=o,i.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()},e.prototype.pop=function(r){var n=this.renderer.gl;if(this.getStackLength()===0)n.disable(n.STENCIL_TEST);else{var i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,a=i?i._colorMask:15;a!==0&&(i._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilOp(n.KEEP,n.KEEP,n.DECR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,a!==0&&(i._colorMask=a,n.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()}},e.prototype._useCurrent=function(){var r=this.renderer.gl;r.stencilFunc(r.EQUAL,this.getStackLength(),4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP)},e}(NL),vw=function(){function t(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Ut,this.transform=null}return t.prototype.update=function(e,r,n,i){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);var a=this.renderer;a.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,a.globalUniforms.update(),a.shader.shader&&a.shader.syncUniformGroup(a.shader.shader.uniforms.globals)},t.prototype.calculateProjection=function(e,r,n,i){var a=this.projectionMatrix,o=i?-1:1;a.identity(),a.a=1/r.width*2,a.d=o*(1/r.height*2),a.tx=-1-r.x*a.a,a.ty=-o-r.y*a.d},t.prototype.setTransform=function(e){},t.prototype.destroy=function(){this.renderer=null},t}(),Lo=new Ye,Xu=new Ye,mw=function(){function t(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Ye,this.destinationFrame=new Ye,this.viewportFrame=new Ye}return t.prototype.bind=function(e,r,n){e===void 0&&(e=null);var i=this.renderer;this.current=e;var a,o,s;e?(a=e.baseTexture,s=a.resolution,r||(Lo.width=e.frame.width,Lo.height=e.frame.height,r=Lo),n||(Xu.x=e.frame.x,Xu.y=e.frame.y,Xu.width=r.width,Xu.height=r.height,n=Xu),o=a.framebuffer):(s=i.resolution,r||(Lo.width=i.screen.width,Lo.height=i.screen.height,r=Lo),n||(n=Lo,n.width=r.width,n.height=r.height));var u=this.viewportFrame;u.x=n.x*s,u.y=n.y*s,u.width=n.width*s,u.height=n.height*s,e||(u.y=i.view.height-(u.y+u.height)),u.ceil(),this.renderer.framebuffer.bind(o,u),this.renderer.projection.update(n,r,s,!o),e?this.renderer.mask.setMaskStack(a.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)},t.prototype.clear=function(e,r){this.current?e=e||this.current.baseTexture.clearColor:e=e||this.clearColor;var n=this.destinationFrame,i=this.current?this.current.baseTexture:this.renderer.screen,a=n.width!==i.width||n.height!==i.height;if(a){var o=this.viewportFrame,s=o.x,u=o.y,l=o.width,c=o.height;s=Math.round(s),u=Math.round(u),l=Math.round(l),c=Math.round(c),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(s,u,l,c)}this.renderer.framebuffer.clear(e[0],e[1],e[2],e[3],r),a&&this.renderer.scissor.pop()},t.prototype.resize=function(){this.bind(null)},t.prototype.reset=function(){this.bind(null)},t.prototype.destroy=function(){this.renderer=null},t}();function Kpe(t,e,r,n,i){r.buffer.update(i)}var Zpe={float:` data[offset] = v; `,vec2:` data[offset] = v[0]; @@ -570,7 +570,7 @@ void main(void) { data[offset + i] = v[i]; } - `},NL={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function LL(t){for(var e=t.map(function(u){return{data:u,offset:0,dataLen:0,dirty:0}}),r=0,n=0,i=0,a=0;a1&&(r=Math.max(r,16)*o.data.size),o.dataLen=r,n%r!==0&&n<16){var s=n%r%16;n+=s,i+=s}n+r>16?(i=Math.ceil(i/16)*16,o.offset=i,i+=r,n=r):(o.offset=i,n+=r,i+=r)}return i=Math.ceil(i/16)*16,{uboElements:e,size:i}}function DL(t,e){var r=[];for(var n in t)e[n]&&r.push(e[n]);return r.sort(function(i,a){return i.index-a.index}),r}function BL(t,e){if(!t.autoManage)return{size:0,syncFunc:qpe};for(var r=DL(t.uniforms,e),n=LL(r),i=n.uboElements,a=n.size,o=[` + `},LL={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function DL(t){for(var e=t.map(function(u){return{data:u,offset:0,dataLen:0,dirty:0}}),r=0,n=0,i=0,a=0;a1&&(r=Math.max(r,16)*o.data.size),o.dataLen=r,n%r!==0&&n<16){var s=n%r%16;n+=s,i+=s}n+r>16?(i=Math.ceil(i/16)*16,o.offset=i,i+=r,n=r):(o.offset=i,n+=r,i+=r)}return i=Math.ceil(i/16)*16,{uboElements:e,size:i}}function BL(t,e){var r=[];for(var n in t)e[n]&&r.push(e[n]);return r.sort(function(i,a){return i.index-a.index}),r}function jL(t,e){if(!t.autoManage)return{size:0,syncFunc:Kpe};for(var r=BL(t.uniforms,e),n=DL(r),i=n.uboElements,a=n.size,o=[` var v = null; var v2 = null; var cv = null; @@ -578,7 +578,7 @@ void main(void) var gl = renderer.gl var index = 0; var data = buffer.data; - `],s=0;s1){var p=RL(u.data.type),v=Math.max(NL[u.data.type]/16,1),g=p/v,m=(4-g%4)%4;o.push(` + `],s=0;s1){var p=IL(u.data.type),v=Math.max(LL[u.data.type]/16,1),g=p/v,m=(4-g%4)%4;o.push(` cv = ud.`+c+`.value; v = uv.`+c+`; offset = `+u.offset/4+`; @@ -594,7 +594,7 @@ void main(void) offset += `+m+`; } - `)}else{var y=Kpe[u.data.type];o.push(` + `)}else{var y=Zpe[u.data.type];o.push(` cv = ud.`+c+`.value; v = uv.`+c+`; offset = `+u.offset/4+`; @@ -602,7 +602,7 @@ void main(void) `)}}return o.push(` renderer.buffer.update(buffer); `),{size:a,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(` -`))}}var Zpe=function(){function t(){}return t}(),jL=function(){function t(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return t.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},t}();function Qpe(t,e){for(var r={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;if?1:-1});for(var o=0;o>1,n++;this.stateId=e.data}for(var n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},t.prototype.run=function(){for(var e=this.renderer.texture,r=e.managedTextures,n=!1,i=0;ithis.maxIdle&&(e.destroyTexture(a,!0),r[i]=null,n=!0)}if(n){for(var o=0,i=0;i=0;i--)this.unload(e.children[i])},t.prototype.destroy=function(){this.renderer=null},t}();function lve(t){var e,r,n,i,a,o,s,u,l,c,f,h,d,p,v,g,m,y,_,x,b,S,w;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?w=(e={},e[Re.UNSIGNED_BYTE]=(r={},r[ve.RGBA]=t.RGBA8,r[ve.RGB]=t.RGB8,r[ve.RG]=t.RG8,r[ve.RED]=t.R8,r[ve.RGBA_INTEGER]=t.RGBA8UI,r[ve.RGB_INTEGER]=t.RGB8UI,r[ve.RG_INTEGER]=t.RG8UI,r[ve.RED_INTEGER]=t.R8UI,r[ve.ALPHA]=t.ALPHA,r[ve.LUMINANCE]=t.LUMINANCE,r[ve.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,r),e[Re.BYTE]=(n={},n[ve.RGBA]=t.RGBA8_SNORM,n[ve.RGB]=t.RGB8_SNORM,n[ve.RG]=t.RG8_SNORM,n[ve.RED]=t.R8_SNORM,n[ve.RGBA_INTEGER]=t.RGBA8I,n[ve.RGB_INTEGER]=t.RGB8I,n[ve.RG_INTEGER]=t.RG8I,n[ve.RED_INTEGER]=t.R8I,n),e[Re.UNSIGNED_SHORT]=(i={},i[ve.RGBA_INTEGER]=t.RGBA16UI,i[ve.RGB_INTEGER]=t.RGB16UI,i[ve.RG_INTEGER]=t.RG16UI,i[ve.RED_INTEGER]=t.R16UI,i[ve.DEPTH_COMPONENT]=t.DEPTH_COMPONENT16,i),e[Re.SHORT]=(a={},a[ve.RGBA_INTEGER]=t.RGBA16I,a[ve.RGB_INTEGER]=t.RGB16I,a[ve.RG_INTEGER]=t.RG16I,a[ve.RED_INTEGER]=t.R16I,a),e[Re.UNSIGNED_INT]=(o={},o[ve.RGBA_INTEGER]=t.RGBA32UI,o[ve.RGB_INTEGER]=t.RGB32UI,o[ve.RG_INTEGER]=t.RG32UI,o[ve.RED_INTEGER]=t.R32UI,o[ve.DEPTH_COMPONENT]=t.DEPTH_COMPONENT24,o),e[Re.INT]=(s={},s[ve.RGBA_INTEGER]=t.RGBA32I,s[ve.RGB_INTEGER]=t.RGB32I,s[ve.RG_INTEGER]=t.RG32I,s[ve.RED_INTEGER]=t.R32I,s),e[Re.FLOAT]=(u={},u[ve.RGBA]=t.RGBA32F,u[ve.RGB]=t.RGB32F,u[ve.RG]=t.RG32F,u[ve.RED]=t.R32F,u[ve.DEPTH_COMPONENT]=t.DEPTH_COMPONENT32F,u),e[Re.HALF_FLOAT]=(l={},l[ve.RGBA]=t.RGBA16F,l[ve.RGB]=t.RGB16F,l[ve.RG]=t.RG16F,l[ve.RED]=t.R16F,l),e[Re.UNSIGNED_SHORT_5_6_5]=(c={},c[ve.RGB]=t.RGB565,c),e[Re.UNSIGNED_SHORT_4_4_4_4]=(f={},f[ve.RGBA]=t.RGBA4,f),e[Re.UNSIGNED_SHORT_5_5_5_1]=(h={},h[ve.RGBA]=t.RGB5_A1,h),e[Re.UNSIGNED_INT_2_10_10_10_REV]=(d={},d[ve.RGBA]=t.RGB10_A2,d[ve.RGBA_INTEGER]=t.RGB10_A2UI,d),e[Re.UNSIGNED_INT_10F_11F_11F_REV]=(p={},p[ve.RGB]=t.R11F_G11F_B10F,p),e[Re.UNSIGNED_INT_5_9_9_9_REV]=(v={},v[ve.RGB]=t.RGB9_E5,v),e[Re.UNSIGNED_INT_24_8]=(g={},g[ve.DEPTH_STENCIL]=t.DEPTH24_STENCIL8,g),e[Re.FLOAT_32_UNSIGNED_INT_24_8_REV]=(m={},m[ve.DEPTH_STENCIL]=t.DEPTH32F_STENCIL8,m),e):w=(y={},y[Re.UNSIGNED_BYTE]=(_={},_[ve.RGBA]=t.RGBA,_[ve.RGB]=t.RGB,_[ve.ALPHA]=t.ALPHA,_[ve.LUMINANCE]=t.LUMINANCE,_[ve.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,_),y[Re.UNSIGNED_SHORT_5_6_5]=(x={},x[ve.RGB]=t.RGB,x),y[Re.UNSIGNED_SHORT_4_4_4_4]=(b={},b[ve.RGBA]=t.RGBA,b),y[Re.UNSIGNED_SHORT_5_5_5_1]=(S={},S[ve.RGBA]=t.RGBA,S),y),w}var wd=function(){function t(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Re.UNSIGNED_BYTE,this.internalFormat=ve.RGBA,this.samplerType=0}return t}(),_w=function(){function t(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Je,this.hasIntegerTextures=!1}return t.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=lve(e);var r=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(var n=0;n=0;--o){var s=n[o];if(s){var u=s._glTextures[a];u.samplerType!==rf.FLOAT&&this.renderer.texture.unbind(s)}}},t.prototype.initTexture=function(e){var r=new wd(this.gl.createTexture());return r.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),r},t.prototype.initTextureType=function(e,r){var n,i;r.internalFormat=(i=(n=this.internalFormats[e.type])===null||n===void 0?void 0:n[e.format])!==null&&i!==void 0?i:e.format,this.webGLVersion===2&&e.type===Re.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=e.type},t.prototype.updateTexture=function(e){var r=e._glTextures[this.CONTEXT_UID];if(r){var n=this.renderer;if(this.initTextureType(e,r),e.resource&&e.resource.upload(n,e,r))r.samplerType!==rf.FLOAT&&(this.hasIntegerTextures=!0);else{var i=e.realWidth,a=e.realHeight,o=n.gl;(r.width!==i||r.height!==a||r.dirtyId<0)&&(r.width=i,r.height=a,o.texImage2D(e.target,0,r.internalFormat,i,a,0,e.format,r.type,null))}e.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(e),r.dirtyId=e.dirtyId}},t.prototype.destroyTexture=function(e,r){var n=this.gl;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!r)){var i=this.managedTextures.indexOf(e);i!==-1&&cs(this.managedTextures,i,1)}},t.prototype.updateTextureStyle=function(e){var r=e._glTextures[this.CONTEXT_UID];r&&((e.mipmap===mn.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?r.mipmap=!1:r.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?r.wrapMode=xi.CLAMP:r.wrapMode=e.wrapMode,e.resource&&e.resource.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)},t.prototype.setStyle=function(e,r){var n=this.gl;if(r.mipmap&&e.mipmap!==mn.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===Ir.LINEAR){var a=Math.min(e.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR:n.NEAREST)},t.prototype.destroy=function(){this.renderer=null},t}(),$L={__proto__:null,FilterSystem:ow,BatchSystem:sw,ContextSystem:lw,FramebufferSystem:uw,GeometrySystem:cw,MaskSystem:fw,ScissorSystem:hw,StencilSystem:dw,ProjectionSystem:pw,RenderTextureSystem:vw,ShaderSystem:mw,StateSystem:gw,TextureGCSystem:yw,TextureSystem:_w},Oy=new Ut,VL=function(t){wt(e,t);function e(r,n){r===void 0&&(r=Ul.UNKNOWN);var i=t.call(this)||this;return n=Object.assign({},xe.RENDER_OPTIONS,n),i.options=n,i.type=r,i.screen=new Ye(0,0,n.width,n.height),i.view=n.view||xe.ADAPTER.createCanvas(),i.resolution=n.resolution||xe.RESOLUTION,i.useContextAlpha=n.useContextAlpha,i.autoDensity=!!n.autoDensity,i.preserveDrawingBuffer=n.preserveDrawingBuffer,i.clearBeforeRender=n.clearBeforeRender,i._backgroundColor=0,i._backgroundColorRgba=[0,0,0,1],i._backgroundColorString="#000000",i.backgroundColor=n.backgroundColor||i._backgroundColor,i.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(pn("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),i.useContextAlpha=n.transparent,i.backgroundAlpha=n.transparent?0:1),i._lastObjectRendered=null,i.plugins={},i}return e.prototype.initPlugins=function(r){for(var n in r)this.plugins[n]=new r[n](this)},Object.defineProperty(e.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(r,n){this.view.width=Math.round(r*this.resolution),this.view.height=Math.round(n*this.resolution);var i=this.view.width/this.resolution,a=this.view.height/this.resolution;this.screen.width=i,this.screen.height=a,this.autoDensity&&(this.view.style.width=i+"px",this.view.style.height=a+"px"),this.emit("resize",i,a)},e.prototype.generateTexture=function(r,n,i,a){n===void 0&&(n={}),typeof n=="number"&&(pn("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),n={scaleMode:n,resolution:i,region:a});var o=n.region,s=wpe(n,["region"]);a=o||r.getLocalBounds(null,!0),a.width===0&&(a.width=1),a.height===0&&(a.height=1);var u=Co.create($_({width:a.width,height:a.height},s));return Oy.tx=-a.x,Oy.ty=-a.y,this.render(r,{renderTexture:u,clear:!1,transform:Oy,skipUpdateTransform:!!r.parent}),u},e.prototype.destroy=function(r){for(var n in this.plugins)this.plugins[n].destroy(),this.plugins[n]=null;r&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var i=this;i.plugins=null,i.type=Ul.UNKNOWN,i.view=null,i.screen=null,i._tempDisplayObjectParent=null,i.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(r){this._backgroundColor=r,this._backgroundColorString=XS(r),gr(r,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(r){this._backgroundColorRgba[3]=r},enumerable:!1,configurable:!0}),e}(mu),uve=function(){function t(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return t}(),cve=function(){function t(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}return t.prototype.destroy=function(){this.renderer=null},t.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},t.prototype.bind=function(e){var r=this,n=r.gl,i=r.CONTEXT_UID,a=e._glBuffers[i]||this.createGLBuffer(e);n.bindBuffer(e.type,a.buffer)},t.prototype.bindBufferBase=function(e,r){var n=this,i=n.gl,a=n.CONTEXT_UID;if(this.boundBufferBases[r]!==e){var o=e._glBuffers[a]||this.createGLBuffer(e);this.boundBufferBases[r]=e,i.bindBufferBase(i.UNIFORM_BUFFER,r,o.buffer)}},t.prototype.bindBufferRange=function(e,r,n){var i=this,a=i.gl,o=i.CONTEXT_UID;n=n||0;var s=e._glBuffers[o]||this.createGLBuffer(e);a.bindBufferRange(a.UNIFORM_BUFFER,r||0,s.buffer,n*256,256)},t.prototype.update=function(e){var r=this,n=r.gl,i=r.CONTEXT_UID,a=e._glBuffers[i];if(e._updateID!==a.updateID)if(a.updateID=e._updateID,n.bindBuffer(e.type,a.buffer),a.byteLength>=e.data.byteLength)n.bufferSubData(e.type,0,e.data);else{var o=e.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;a.byteLength=e.data.byteLength,n.bufferData(e.type,e.data,o)}},t.prototype.dispose=function(e,r){if(this.managedBuffers[e.id]){delete this.managedBuffers[e.id];var n=e._glBuffers[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}},t.prototype.disposeAll=function(e){for(var r=Object.keys(this.managedBuffers),n=0;n=Ot.HIGH?this.multisample=Ot.HIGH:n>=Ot.MEDIUM?this.multisample=Ot.MEDIUM:n>=Ot.LOW?this.multisample=Ot.LOW:this.multisample=Ot.NONE},e.prototype.addSystem=function(r,n){var i=new r(this);if(this[n])throw new Error('Whoops! The name "'+n+'" is already in use');this[n]=i;for(var a in this.runners)this.runners[a].add(i);return this},e.prototype.render=function(r,n){var i,a,o,s;if(n&&(n instanceof Co?(pn("6.0.0","Renderer#render arguments changed, use options instead."),i=n,a=arguments[2],o=arguments[3],s=arguments[4]):(i=n.renderTexture,a=n.clear,o=n.transform,s=n.skipUpdateTransform)),this.renderingToScreen=!i,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=o,!this.context.isLost){if(i||(this._lastObjectRendered=r),!s){var u=r.enableTempParent();r.updateTransform(),r.disableTempParent(u)}this.renderTexture.bind(i),this.batch.currentRenderer.start(),(a!==void 0?a:this.clearBeforeRender)&&this.renderTexture.clear(),r.render(this),this.batch.currentRenderer.flush(),i&&i.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.generateTexture=function(r,n,i,a){n===void 0&&(n={});var o=t.prototype.generateTexture.call(this,r,n,i,a);return this.framebuffer.blit(),o},e.prototype.resize=function(r,n){t.prototype.resize.call(this,r,n),this.runners.resize.emit(this.screen.height,this.screen.width)},e.prototype.reset=function(){return this.runners.reset.emit(),this},e.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},e.prototype.destroy=function(r){this.runners.destroy.emit();for(var n in this.runners)this.runners[n].destroy();t.prototype.destroy.call(this,r),this.gl=null},Object.defineProperty(e.prototype,"extract",{get:function(){return pn("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),e.registerPlugin=function(r,n){pn("6.5.0","Renderer.registerPlugin() has been deprecated, please use extensions.add() instead."),fa.add({name:r,type:dt.RendererPlugin,ref:n})},e.__plugins={},e}(VL);fa.handleByMap(dt.RendererPlugin,xw.__plugins);function GL(t){return xw.create(t)}var fve=`attribute vec2 aVertexPosition; +`))}}var Qpe=function(){function t(){}return t}(),UL=function(){function t(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return t.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},t}();function Jpe(t,e){for(var r={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;if?1:-1});for(var o=0;o>1,n++;this.stateId=e.data}for(var n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},t.prototype.run=function(){for(var e=this.renderer.texture,r=e.managedTextures,n=!1,i=0;ithis.maxIdle&&(e.destroyTexture(a,!0),r[i]=null,n=!0)}if(n){for(var o=0,i=0;i=0;i--)this.unload(e.children[i])},t.prototype.destroy=function(){this.renderer=null},t}();function uve(t){var e,r,n,i,a,o,s,u,l,c,f,h,d,p,v,g,m,y,_,x,b,S,w;return"WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext?w=(e={},e[Re.UNSIGNED_BYTE]=(r={},r[ve.RGBA]=t.RGBA8,r[ve.RGB]=t.RGB8,r[ve.RG]=t.RG8,r[ve.RED]=t.R8,r[ve.RGBA_INTEGER]=t.RGBA8UI,r[ve.RGB_INTEGER]=t.RGB8UI,r[ve.RG_INTEGER]=t.RG8UI,r[ve.RED_INTEGER]=t.R8UI,r[ve.ALPHA]=t.ALPHA,r[ve.LUMINANCE]=t.LUMINANCE,r[ve.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,r),e[Re.BYTE]=(n={},n[ve.RGBA]=t.RGBA8_SNORM,n[ve.RGB]=t.RGB8_SNORM,n[ve.RG]=t.RG8_SNORM,n[ve.RED]=t.R8_SNORM,n[ve.RGBA_INTEGER]=t.RGBA8I,n[ve.RGB_INTEGER]=t.RGB8I,n[ve.RG_INTEGER]=t.RG8I,n[ve.RED_INTEGER]=t.R8I,n),e[Re.UNSIGNED_SHORT]=(i={},i[ve.RGBA_INTEGER]=t.RGBA16UI,i[ve.RGB_INTEGER]=t.RGB16UI,i[ve.RG_INTEGER]=t.RG16UI,i[ve.RED_INTEGER]=t.R16UI,i[ve.DEPTH_COMPONENT]=t.DEPTH_COMPONENT16,i),e[Re.SHORT]=(a={},a[ve.RGBA_INTEGER]=t.RGBA16I,a[ve.RGB_INTEGER]=t.RGB16I,a[ve.RG_INTEGER]=t.RG16I,a[ve.RED_INTEGER]=t.R16I,a),e[Re.UNSIGNED_INT]=(o={},o[ve.RGBA_INTEGER]=t.RGBA32UI,o[ve.RGB_INTEGER]=t.RGB32UI,o[ve.RG_INTEGER]=t.RG32UI,o[ve.RED_INTEGER]=t.R32UI,o[ve.DEPTH_COMPONENT]=t.DEPTH_COMPONENT24,o),e[Re.INT]=(s={},s[ve.RGBA_INTEGER]=t.RGBA32I,s[ve.RGB_INTEGER]=t.RGB32I,s[ve.RG_INTEGER]=t.RG32I,s[ve.RED_INTEGER]=t.R32I,s),e[Re.FLOAT]=(u={},u[ve.RGBA]=t.RGBA32F,u[ve.RGB]=t.RGB32F,u[ve.RG]=t.RG32F,u[ve.RED]=t.R32F,u[ve.DEPTH_COMPONENT]=t.DEPTH_COMPONENT32F,u),e[Re.HALF_FLOAT]=(l={},l[ve.RGBA]=t.RGBA16F,l[ve.RGB]=t.RGB16F,l[ve.RG]=t.RG16F,l[ve.RED]=t.R16F,l),e[Re.UNSIGNED_SHORT_5_6_5]=(c={},c[ve.RGB]=t.RGB565,c),e[Re.UNSIGNED_SHORT_4_4_4_4]=(f={},f[ve.RGBA]=t.RGBA4,f),e[Re.UNSIGNED_SHORT_5_5_5_1]=(h={},h[ve.RGBA]=t.RGB5_A1,h),e[Re.UNSIGNED_INT_2_10_10_10_REV]=(d={},d[ve.RGBA]=t.RGB10_A2,d[ve.RGBA_INTEGER]=t.RGB10_A2UI,d),e[Re.UNSIGNED_INT_10F_11F_11F_REV]=(p={},p[ve.RGB]=t.R11F_G11F_B10F,p),e[Re.UNSIGNED_INT_5_9_9_9_REV]=(v={},v[ve.RGB]=t.RGB9_E5,v),e[Re.UNSIGNED_INT_24_8]=(g={},g[ve.DEPTH_STENCIL]=t.DEPTH24_STENCIL8,g),e[Re.FLOAT_32_UNSIGNED_INT_24_8_REV]=(m={},m[ve.DEPTH_STENCIL]=t.DEPTH32F_STENCIL8,m),e):w=(y={},y[Re.UNSIGNED_BYTE]=(_={},_[ve.RGBA]=t.RGBA,_[ve.RGB]=t.RGB,_[ve.ALPHA]=t.ALPHA,_[ve.LUMINANCE]=t.LUMINANCE,_[ve.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,_),y[Re.UNSIGNED_SHORT_5_6_5]=(x={},x[ve.RGB]=t.RGB,x),y[Re.UNSIGNED_SHORT_4_4_4_4]=(b={},b[ve.RGBA]=t.RGBA,b),y[Re.UNSIGNED_SHORT_5_5_5_1]=(S={},S[ve.RGBA]=t.RGBA,S),y),w}var wd=function(){function t(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Re.UNSIGNED_BYTE,this.internalFormat=ve.RGBA,this.samplerType=0}return t}(),xw=function(){function t(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Je,this.hasIntegerTextures=!1}return t.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=uve(e);var r=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(var n=0;n=0;--o){var s=n[o];if(s){var u=s._glTextures[a];u.samplerType!==rf.FLOAT&&this.renderer.texture.unbind(s)}}},t.prototype.initTexture=function(e){var r=new wd(this.gl.createTexture());return r.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),r},t.prototype.initTextureType=function(e,r){var n,i;r.internalFormat=(i=(n=this.internalFormats[e.type])===null||n===void 0?void 0:n[e.format])!==null&&i!==void 0?i:e.format,this.webGLVersion===2&&e.type===Re.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=e.type},t.prototype.updateTexture=function(e){var r=e._glTextures[this.CONTEXT_UID];if(r){var n=this.renderer;if(this.initTextureType(e,r),e.resource&&e.resource.upload(n,e,r))r.samplerType!==rf.FLOAT&&(this.hasIntegerTextures=!0);else{var i=e.realWidth,a=e.realHeight,o=n.gl;(r.width!==i||r.height!==a||r.dirtyId<0)&&(r.width=i,r.height=a,o.texImage2D(e.target,0,r.internalFormat,i,a,0,e.format,r.type,null))}e.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(e),r.dirtyId=e.dirtyId}},t.prototype.destroyTexture=function(e,r){var n=this.gl;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),n.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!r)){var i=this.managedTextures.indexOf(e);i!==-1&&cs(this.managedTextures,i,1)}},t.prototype.updateTextureStyle=function(e){var r=e._glTextures[this.CONTEXT_UID];r&&((e.mipmap===mn.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?r.mipmap=!1:r.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?r.wrapMode=xi.CLAMP:r.wrapMode=e.wrapMode,e.resource&&e.resource.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)},t.prototype.setStyle=function(e,r){var n=this.gl;if(r.mipmap&&e.mipmap!==mn.ON_MANUAL&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&e.anisotropicLevel>0&&e.scaleMode===Ir.LINEAR){var a=Math.min(e.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,i.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===Ir.LINEAR?n.LINEAR:n.NEAREST)},t.prototype.destroy=function(){this.renderer=null},t}(),VL={__proto__:null,FilterSystem:sw,BatchSystem:lw,ContextSystem:uw,FramebufferSystem:cw,GeometrySystem:fw,MaskSystem:hw,ScissorSystem:dw,StencilSystem:pw,ProjectionSystem:vw,RenderTextureSystem:mw,ShaderSystem:gw,StateSystem:yw,TextureGCSystem:_w,TextureSystem:xw},Oy=new Ut,GL=function(t){wt(e,t);function e(r,n){r===void 0&&(r=Ul.UNKNOWN);var i=t.call(this)||this;return n=Object.assign({},xe.RENDER_OPTIONS,n),i.options=n,i.type=r,i.screen=new Ye(0,0,n.width,n.height),i.view=n.view||xe.ADAPTER.createCanvas(),i.resolution=n.resolution||xe.RESOLUTION,i.useContextAlpha=n.useContextAlpha,i.autoDensity=!!n.autoDensity,i.preserveDrawingBuffer=n.preserveDrawingBuffer,i.clearBeforeRender=n.clearBeforeRender,i._backgroundColor=0,i._backgroundColorRgba=[0,0,0,1],i._backgroundColorString="#000000",i.backgroundColor=n.backgroundColor||i._backgroundColor,i.backgroundAlpha=n.backgroundAlpha,n.transparent!==void 0&&(pn("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),i.useContextAlpha=n.transparent,i.backgroundAlpha=n.transparent?0:1),i._lastObjectRendered=null,i.plugins={},i}return e.prototype.initPlugins=function(r){for(var n in r)this.plugins[n]=new r[n](this)},Object.defineProperty(e.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(r,n){this.view.width=Math.round(r*this.resolution),this.view.height=Math.round(n*this.resolution);var i=this.view.width/this.resolution,a=this.view.height/this.resolution;this.screen.width=i,this.screen.height=a,this.autoDensity&&(this.view.style.width=i+"px",this.view.style.height=a+"px"),this.emit("resize",i,a)},e.prototype.generateTexture=function(r,n,i,a){n===void 0&&(n={}),typeof n=="number"&&(pn("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),n={scaleMode:n,resolution:i,region:a});var o=n.region,s=Epe(n,["region"]);a=o||r.getLocalBounds(null,!0),a.width===0&&(a.width=1),a.height===0&&(a.height=1);var u=Co.create(V_({width:a.width,height:a.height},s));return Oy.tx=-a.x,Oy.ty=-a.y,this.render(r,{renderTexture:u,clear:!1,transform:Oy,skipUpdateTransform:!!r.parent}),u},e.prototype.destroy=function(r){for(var n in this.plugins)this.plugins[n].destroy(),this.plugins[n]=null;r&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var i=this;i.plugins=null,i.type=Ul.UNKNOWN,i.view=null,i.screen=null,i._tempDisplayObjectParent=null,i.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(r){this._backgroundColor=r,this._backgroundColorString=zS(r),yr(r,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(r){this._backgroundColorRgba[3]=r},enumerable:!1,configurable:!0}),e}(mu),cve=function(){function t(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return t}(),fve=function(){function t(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}return t.prototype.destroy=function(){this.renderer=null},t.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},t.prototype.bind=function(e){var r=this,n=r.gl,i=r.CONTEXT_UID,a=e._glBuffers[i]||this.createGLBuffer(e);n.bindBuffer(e.type,a.buffer)},t.prototype.bindBufferBase=function(e,r){var n=this,i=n.gl,a=n.CONTEXT_UID;if(this.boundBufferBases[r]!==e){var o=e._glBuffers[a]||this.createGLBuffer(e);this.boundBufferBases[r]=e,i.bindBufferBase(i.UNIFORM_BUFFER,r,o.buffer)}},t.prototype.bindBufferRange=function(e,r,n){var i=this,a=i.gl,o=i.CONTEXT_UID;n=n||0;var s=e._glBuffers[o]||this.createGLBuffer(e);a.bindBufferRange(a.UNIFORM_BUFFER,r||0,s.buffer,n*256,256)},t.prototype.update=function(e){var r=this,n=r.gl,i=r.CONTEXT_UID,a=e._glBuffers[i];if(e._updateID!==a.updateID)if(a.updateID=e._updateID,n.bindBuffer(e.type,a.buffer),a.byteLength>=e.data.byteLength)n.bufferSubData(e.type,0,e.data);else{var o=e.static?n.STATIC_DRAW:n.DYNAMIC_DRAW;a.byteLength=e.data.byteLength,n.bufferData(e.type,e.data,o)}},t.prototype.dispose=function(e,r){if(this.managedBuffers[e.id]){delete this.managedBuffers[e.id];var n=e._glBuffers[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete e._glBuffers[this.CONTEXT_UID])}},t.prototype.disposeAll=function(e){for(var r=Object.keys(this.managedBuffers),n=0;n=Ot.HIGH?this.multisample=Ot.HIGH:n>=Ot.MEDIUM?this.multisample=Ot.MEDIUM:n>=Ot.LOW?this.multisample=Ot.LOW:this.multisample=Ot.NONE},e.prototype.addSystem=function(r,n){var i=new r(this);if(this[n])throw new Error('Whoops! The name "'+n+'" is already in use');this[n]=i;for(var a in this.runners)this.runners[a].add(i);return this},e.prototype.render=function(r,n){var i,a,o,s;if(n&&(n instanceof Co?(pn("6.0.0","Renderer#render arguments changed, use options instead."),i=n,a=arguments[2],o=arguments[3],s=arguments[4]):(i=n.renderTexture,a=n.clear,o=n.transform,s=n.skipUpdateTransform)),this.renderingToScreen=!i,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=o,!this.context.isLost){if(i||(this._lastObjectRendered=r),!s){var u=r.enableTempParent();r.updateTransform(),r.disableTempParent(u)}this.renderTexture.bind(i),this.batch.currentRenderer.start(),(a!==void 0?a:this.clearBeforeRender)&&this.renderTexture.clear(),r.render(this),this.batch.currentRenderer.flush(),i&&i.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.generateTexture=function(r,n,i,a){n===void 0&&(n={});var o=t.prototype.generateTexture.call(this,r,n,i,a);return this.framebuffer.blit(),o},e.prototype.resize=function(r,n){t.prototype.resize.call(this,r,n),this.runners.resize.emit(this.screen.height,this.screen.width)},e.prototype.reset=function(){return this.runners.reset.emit(),this},e.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},e.prototype.destroy=function(r){this.runners.destroy.emit();for(var n in this.runners)this.runners[n].destroy();t.prototype.destroy.call(this,r),this.gl=null},Object.defineProperty(e.prototype,"extract",{get:function(){return pn("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),e.registerPlugin=function(r,n){pn("6.5.0","Renderer.registerPlugin() has been deprecated, please use extensions.add() instead."),fa.add({name:r,type:dt.RendererPlugin,ref:n})},e.__plugins={},e}(GL);fa.handleByMap(dt.RendererPlugin,bw.__plugins);function XL(t){return bw.create(t)}var hve=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -613,7 +613,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,hve=`attribute vec2 aVertexPosition; +}`,dve=`attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; @@ -639,7 +639,7 @@ void main(void) gl_Position = filterVertexPosition(); vTextureCoord = filterTextureCoord(); } -`,XL=fve,bw=hve,dve=function(){function t(e){pn("6.1.0","System class is deprecated, implemement ISystem interface instead."),this.renderer=e}return t.prototype.destroy=function(){this.renderer=null},t}(),bp=function(){function t(){this.texArray=null,this.blend=0,this.type=Ln.TRIANGLES,this.start=0,this.size=0,this.data=null}return t}(),Sp=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var e=0;ethis.size&&this.flush(),this._vertexCount+=r.vertexData.length/2,this._indexCount+=r.indices.length,this._bufferedTextures[this._bufferSize]=r._texture.baseTexture,this._bufferedElements[this._bufferSize++]=r)},e.prototype.buildTexturesAndDrawCalls=function(){var r=this,n=r._bufferedTextures,i=r.MAX_TEXTURES,a=e._textureArrayPool,o=this.renderer.batch,s=this._tempBoundTextures,u=this.renderer.textureGC.count,l=++Je._globalBatch,c=0,f=a[0],h=0;o.copyBoundTextures(s,i);for(var d=0;d=i&&(o.boundArray(f,s,l,i),this.buildDrawCalls(f,h,d),h=d,f=a[++c],++l),p._batchEnabled=l,p.touched=u,f.elements[f.count++]=p)}f.count>0&&(o.boundArray(f,s,l,i),this.buildDrawCalls(f,h,this._bufferSize),++c,++l);for(var d=0;dthis.size&&this.flush(),this._vertexCount+=r.vertexData.length/2,this._indexCount+=r.indices.length,this._bufferedTextures[this._bufferSize]=r._texture.baseTexture,this._bufferedElements[this._bufferSize++]=r)},e.prototype.buildTexturesAndDrawCalls=function(){var r=this,n=r._bufferedTextures,i=r.MAX_TEXTURES,a=e._textureArrayPool,o=this.renderer.batch,s=this._tempBoundTextures,u=this.renderer.textureGC.count,l=++Je._globalBatch,c=0,f=a[0],h=0;o.copyBoundTextures(s,i);for(var d=0;d=i&&(o.boundArray(f,s,l,i),this.buildDrawCalls(f,h,d),h=d,f=a[++c],++l),p._batchEnabled=l,p.touched=u,f.elements[f.count++]=p)}f.count>0&&(o.boundArray(f,s,l,i),this.buildDrawCalls(f,h,this._bufferSize),++c,++l);for(var d=0;d0&&(r+=` else `),n title : "+e.title+"
tabIndex: "+e.tabIndex},t.prototype.capHitArea=function(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);var r=this.renderer,n=r.width,i=r.height;e.x+e.width>n&&(e.width=n-e.x),e.y+e.height>i&&(e.height=i-e.y)},t.prototype.addChild=function(e){var r=this.pool.pop();r||(r=document.createElement("button"),r.style.width=Nh+"px",r.style.height=Nh+"px",r.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",r.style.position="absolute",r.style.zIndex=Y2.toString(),r.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?r.setAttribute("aria-live","off"):r.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?r.setAttribute("aria-relevant","additions"):r.setAttribute("aria-relevant","text"),r.addEventListener("click",this._onClick.bind(this)),r.addEventListener("focus",this._onFocus.bind(this)),r.addEventListener("focusout",this._onFocusOut.bind(this))),r.style.pointerEvents=e.accessiblePointerEvents,r.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?r.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(r.title="displayObject "+e.tabIndex),e.accessibleHint&&e.accessibleHint!==null&&r.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(r),e._accessibleActive=!0,e._accessibleDiv=r,r.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex},t.prototype._onClick=function(e){var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"click",i),r.dispatchEvent(n,"pointertap",i),r.dispatchEvent(n,"tap",i)},t.prototype._onFocus=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive");var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"mouseover",i)},t.prototype._onFocusOut=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite");var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"mouseout",i)},t.prototype._onKeyDown=function(e){e.keyCode===gve&&this.activate()},t.prototype._onMouseMove=function(e){e.movementX===0&&e.movementY===0||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t.extension={name:"accessibility",type:[dt.RendererPlugin,dt.CanvasRendererPlugin]},t}();/*! + */var ZL={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};Yt.mixin(ZL);var yve=9,Nh=100,_ve=0,xve=0,H2=2,q2=1,bve=-1e3,Sve=-1e3,wve=2,QL=function(){function t(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(Jn.tablet||Jn.phone)&&this.createTouchHook();var r=document.createElement("div");r.style.width=Nh+"px",r.style.height=Nh+"px",r.style.position="absolute",r.style.top=_ve+"px",r.style.left=xve+"px",r.style.zIndex=H2.toString(),this.div=r,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}return Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMobileAccessibility",{get:function(){return this._isMobileAccessibility},enumerable:!1,configurable:!0}),t.prototype.createTouchHook=function(){var e=this,r=document.createElement("button");r.style.width=q2+"px",r.style.height=q2+"px",r.style.position="absolute",r.style.top=bve+"px",r.style.left=Sve+"px",r.style.zIndex=wve.toString(),r.style.backgroundColor="#FF0000",r.title="select to enable accessibility for this content",r.addEventListener("focus",function(){e._isMobileAccessibility=!0,e.activate(),e.destroyTouchHook()}),document.body.appendChild(r),this._hookDiv=r},t.prototype.destroyTouchHook=function(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)},t.prototype.activate=function(){var e;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(e=this.renderer.view.parentNode)===null||e===void 0||e.appendChild(this.div))},t.prototype.deactivate=function(){var e;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(e=this.div.parentNode)===null||e===void 0||e.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(e){if(!(!e.visible||!e.accessibleChildren)){e.accessible&&e.interactive&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);var r=e.children;if(r)for(var n=0;n title : "+e.title+"
tabIndex: "+e.tabIndex},t.prototype.capHitArea=function(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);var r=this.renderer,n=r.width,i=r.height;e.x+e.width>n&&(e.width=n-e.x),e.y+e.height>i&&(e.height=i-e.y)},t.prototype.addChild=function(e){var r=this.pool.pop();r||(r=document.createElement("button"),r.style.width=Nh+"px",r.style.height=Nh+"px",r.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",r.style.position="absolute",r.style.zIndex=H2.toString(),r.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?r.setAttribute("aria-live","off"):r.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?r.setAttribute("aria-relevant","additions"):r.setAttribute("aria-relevant","text"),r.addEventListener("click",this._onClick.bind(this)),r.addEventListener("focus",this._onFocus.bind(this)),r.addEventListener("focusout",this._onFocusOut.bind(this))),r.style.pointerEvents=e.accessiblePointerEvents,r.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?r.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(r.title="displayObject "+e.tabIndex),e.accessibleHint&&e.accessibleHint!==null&&r.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(r),e._accessibleActive=!0,e._accessibleDiv=r,r.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex},t.prototype._onClick=function(e){var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"click",i),r.dispatchEvent(n,"pointertap",i),r.dispatchEvent(n,"tap",i)},t.prototype._onFocus=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive");var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"mouseover",i)},t.prototype._onFocusOut=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite");var r=this.renderer.plugins.interaction,n=e.target.displayObject,i=r.eventData;r.dispatchEvent(n,"mouseout",i)},t.prototype._onKeyDown=function(e){e.keyCode===yve&&this.activate()},t.prototype._onMouseMove=function(e){e.movementX===0&&e.movementY===0||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t.extension={name:"accessibility",type:[dt.RendererPlugin,dt.CanvasRendererPlugin]},t}();/*! * @pixi/interaction - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/interaction is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */var G_=function(){function t(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new We,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(t.prototype,"pointerId",{get:function(){return this.identifier},enumerable:!1,configurable:!0}),t.prototype.getLocalPosition=function(e,r,n){return e.worldTransform.applyInverse(n||this.global,r)},t.prototype.copyEvent=function(e){"isPrimary"in e&&e.isPrimary&&(this.isPrimary=!0),this.button="button"in e&&e.button;var r="buttons"in e&&e.buttons;this.buttons=Number.isInteger(r)?r:"which"in e&&e.which,this.width="width"in e&&e.width,this.height="height"in e&&e.height,this.tiltX="tiltX"in e&&e.tiltX,this.tiltY="tiltY"in e&&e.tiltY,this.pointerType="pointerType"in e&&e.pointerType,this.pressure="pressure"in e&&e.pressure,this.rotationAngle="rotationAngle"in e&&e.rotationAngle,this.twist="twist"in e&&e.twist||0,this.tangentialPressure="tangentialPressure"in e&&e.tangentialPressure||0},t.prototype.reset=function(){this.isPrimary=!1},t}();/*! ***************************************************************************** + */var X_=function(){function t(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new We,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(t.prototype,"pointerId",{get:function(){return this.identifier},enumerable:!1,configurable:!0}),t.prototype.getLocalPosition=function(e,r,n){return e.worldTransform.applyInverse(n||this.global,r)},t.prototype.copyEvent=function(e){"isPrimary"in e&&e.isPrimary&&(this.isPrimary=!0),this.button="button"in e&&e.button;var r="buttons"in e&&e.buttons;this.buttons=Number.isInteger(r)?r:"which"in e&&e.which,this.width="width"in e&&e.width,this.height="height"in e&&e.height,this.tiltX="tiltX"in e&&e.tiltX,this.tiltY="tiltY"in e&&e.tiltY,this.pointerType="pointerType"in e&&e.pointerType,this.pressure="pressure"in e&&e.pressure,this.rotationAngle="rotationAngle"in e&&e.rotationAngle,this.twist="twist"in e&&e.twist||0,this.tangentialPressure="tangentialPressure"in e&&e.tangentialPressure||0},t.prototype.reset=function(){this.isPrimary=!1},t}();/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -703,19 +703,19 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var X_=function(t,e){return X_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},X_(t,e)};function wve(t,e){X_(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var QL=function(){function t(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},t.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},t}(),Ed=function(){function t(e){this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(e,r){r?this._flags=this._flags|e:this._flags=this._flags&~e},Object.defineProperty(t.prototype,"pointerId",{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"flags",{get:function(){return this._flags},set:function(e){this._flags=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"none",{get:function(){return this._flags===t.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"over",{get:function(){return(this._flags&t.FLAGS.OVER)!==0},set:function(e){this._doSet(t.FLAGS.OVER,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightDown",{get:function(){return(this._flags&t.FLAGS.RIGHT_DOWN)!==0},set:function(e){this._doSet(t.FLAGS.RIGHT_DOWN,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftDown",{get:function(){return(this._flags&t.FLAGS.LEFT_DOWN)!==0},set:function(e){this._doSet(t.FLAGS.LEFT_DOWN,e)},enumerable:!1,configurable:!0}),t.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4}),t}(),Eve=function(){function t(){this._tempPoint=new We}return t.prototype.recursiveFindHit=function(e,r,n,i,a){var o;if(!r||!r.visible)return!1;var s=e.data.global;a=r.interactive||a;var u=!1,l=a,c=!0;if(r.hitArea)i&&(r.worldTransform.applyInverse(s,this._tempPoint),r.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?u=!0:(i=!1,c=!1)),l=!1;else if(r._mask&&i){var f=r._mask.isMaskData?r._mask.maskObject:r._mask;f&&!(!((o=f.containsPoint)===null||o===void 0)&&o.call(f,s))&&(i=!1)}if(c&&r.interactiveChildren&&r.children)for(var h=r.children,d=h.length-1;d>=0;d--){var p=h[d],v=this.recursiveFindHit(e,p,n,i,l);if(v){if(!p.parent)continue;l=!1,v&&(e.target&&(i=!1),u=!0)}}return a&&(i&&!e.target&&!r.hitArea&&r.containsPoint&&r.containsPoint(s)&&(u=!0),r.interactive&&(u&&!e.target&&(e.target=r),n&&n(e,r,!!u))),u},t.prototype.findHit=function(e,r,n,i){this.recursiveFindHit(e,r,n,i,!1)},t}(),JL={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor==="pointer"},set buttonMode(t){t?this.cursor="pointer":this.cursor==="pointer"&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};Wt.mixin(JL);var Lh=1,Dh={target:null,data:{global:null}},eD=function(t){wve(e,t);function e(r,n){var i=t.call(this)||this;return n=n||{},i.renderer=r,i.autoPreventDefault=n.autoPreventDefault!==void 0?n.autoPreventDefault:!0,i.interactionFrequency=n.interactionFrequency||10,i.mouse=new G_,i.mouse.identifier=Lh,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[Lh]=i.mouse,i.interactionDataPool=[],i.eventData=new QL,i.interactionDOMElement=null,i.moveWhenInside=!1,i.eventsAdded=!1,i.tickerAdded=!1,i.mouseOverRenderer=!("PointerEvent"in globalThis),i.supportsTouchEvents="ontouchstart"in globalThis,i.supportsPointerEvents=!!globalThis.PointerEvent,i.onPointerUp=i.onPointerUp.bind(i),i.processPointerUp=i.processPointerUp.bind(i),i.onPointerCancel=i.onPointerCancel.bind(i),i.processPointerCancel=i.processPointerCancel.bind(i),i.onPointerDown=i.onPointerDown.bind(i),i.processPointerDown=i.processPointerDown.bind(i),i.onPointerMove=i.onPointerMove.bind(i),i.processPointerMove=i.processPointerMove.bind(i),i.onPointerOut=i.onPointerOut.bind(i),i.processPointerOverOut=i.processPointerOverOut.bind(i),i.onPointerOver=i.onPointerOver.bind(i),i.cursorStyles={default:"inherit",pointer:"pointer"},i.currentCursorMode=null,i.cursor=null,i.resolution=1,i.delayedEvents=[],i.search=new Eve,i._tempDisplayObject=new KS,i._eventListenerOptions={capture:!0,passive:!1},i._useSystemTicker=n.useSystemTicker!==void 0?n.useSystemTicker:!0,i.setTargetElement(i.renderer.view,i.renderer.resolution),i}return Object.defineProperty(e.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(r){this._useSystemTicker=r,r?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),e.prototype.hitTest=function(r,n){return Dh.target=null,Dh.data.global=r,n||(n=this.lastObjectRendered),this.processInteractive(Dh,n,null,!0),Dh.target},e.prototype.setTargetElement=function(r,n){n===void 0&&(n=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=r,this.resolution=n,this.addEvents(),this.addTickerListener()},e.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(Or.system.add(this.tickerUpdate,this,ra.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(Or.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},e.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var r=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="none",r.msTouchAction="none"):this.supportsPointerEvents&&(r.touchAction="none"),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},e.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var r=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="",r.msTouchAction=""):this.supportsPointerEvents&&(r.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},e.prototype.tickerUpdate=function(r){this._deltaTime+=r,!(this._deltaTime0&&(s=r.composedPath()[0]);for(var u=s!==this.interactionDOMElement?"outside":"",l=0;l"u"&&(o.button=r.touches.length?1:0),typeof o.buttons>"u"&&(o.buttons=r.touches.length?1:0),typeof o.isPrimary>"u"&&(o.isPrimary=r.touches.length===1&&r.type==="touchstart"),typeof o.width>"u"&&(o.width=o.radiusX||1),typeof o.height>"u"&&(o.height=o.radiusY||1),typeof o.tiltX>"u"&&(o.tiltX=0),typeof o.tiltY>"u"&&(o.tiltY=0),typeof o.pointerType>"u"&&(o.pointerType="touch"),typeof o.pointerId>"u"&&(o.pointerId=o.identifier||0),typeof o.pressure>"u"&&(o.pressure=o.force||.5),typeof o.twist>"u"&&(o.twist=0),typeof o.tangentialPressure>"u"&&(o.tangentialPressure=0),typeof o.layerX>"u"&&(o.layerX=o.offsetX=o.clientX),typeof o.layerY>"u"&&(o.layerY=o.offsetY=o.clientY),o.isNormalized=!0,n.push(o)}else if(!globalThis.MouseEvent||r instanceof MouseEvent&&(!this.supportsPointerEvents||!(r instanceof globalThis.PointerEvent))){var s=r;typeof s.isPrimary>"u"&&(s.isPrimary=!0),typeof s.width>"u"&&(s.width=1),typeof s.height>"u"&&(s.height=1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="mouse"),typeof s.pointerId>"u"&&(s.pointerId=Lh),typeof s.pressure>"u"&&(s.pressure=.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),s.isNormalized=!0,n.push(s)}else n.push(r);return n},e.prototype.destroy=function(){this.removeEvents(),this.removeTickerListener(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.search=null},e.extension={name:"interaction",type:[dt.RendererPlugin,dt.CanvasRendererPlugin]},e}(mu);/*! +***************************************************************************** */var z_=function(t,e){return z_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},z_(t,e)};function Eve(t,e){z_(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var JL=function(){function t(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},t.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},t}(),Ed=function(){function t(e){this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(e,r){r?this._flags=this._flags|e:this._flags=this._flags&~e},Object.defineProperty(t.prototype,"pointerId",{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"flags",{get:function(){return this._flags},set:function(e){this._flags=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"none",{get:function(){return this._flags===t.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"over",{get:function(){return(this._flags&t.FLAGS.OVER)!==0},set:function(e){this._doSet(t.FLAGS.OVER,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightDown",{get:function(){return(this._flags&t.FLAGS.RIGHT_DOWN)!==0},set:function(e){this._doSet(t.FLAGS.RIGHT_DOWN,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftDown",{get:function(){return(this._flags&t.FLAGS.LEFT_DOWN)!==0},set:function(e){this._doSet(t.FLAGS.LEFT_DOWN,e)},enumerable:!1,configurable:!0}),t.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4}),t}(),Tve=function(){function t(){this._tempPoint=new We}return t.prototype.recursiveFindHit=function(e,r,n,i,a){var o;if(!r||!r.visible)return!1;var s=e.data.global;a=r.interactive||a;var u=!1,l=a,c=!0;if(r.hitArea)i&&(r.worldTransform.applyInverse(s,this._tempPoint),r.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?u=!0:(i=!1,c=!1)),l=!1;else if(r._mask&&i){var f=r._mask.isMaskData?r._mask.maskObject:r._mask;f&&!(!((o=f.containsPoint)===null||o===void 0)&&o.call(f,s))&&(i=!1)}if(c&&r.interactiveChildren&&r.children)for(var h=r.children,d=h.length-1;d>=0;d--){var p=h[d],v=this.recursiveFindHit(e,p,n,i,l);if(v){if(!p.parent)continue;l=!1,v&&(e.target&&(i=!1),u=!0)}}return a&&(i&&!e.target&&!r.hitArea&&r.containsPoint&&r.containsPoint(s)&&(u=!0),r.interactive&&(u&&!e.target&&(e.target=r),n&&n(e,r,!!u))),u},t.prototype.findHit=function(e,r,n,i){this.recursiveFindHit(e,r,n,i,!1)},t}(),eD={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor==="pointer"},set buttonMode(t){t?this.cursor="pointer":this.cursor==="pointer"&&(this.cursor=null)},cursor:null,get trackedPointers(){return this._trackedPointers===void 0&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};Yt.mixin(eD);var Lh=1,Dh={target:null,data:{global:null}},tD=function(t){Eve(e,t);function e(r,n){var i=t.call(this)||this;return n=n||{},i.renderer=r,i.autoPreventDefault=n.autoPreventDefault!==void 0?n.autoPreventDefault:!0,i.interactionFrequency=n.interactionFrequency||10,i.mouse=new X_,i.mouse.identifier=Lh,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[Lh]=i.mouse,i.interactionDataPool=[],i.eventData=new JL,i.interactionDOMElement=null,i.moveWhenInside=!1,i.eventsAdded=!1,i.tickerAdded=!1,i.mouseOverRenderer=!("PointerEvent"in globalThis),i.supportsTouchEvents="ontouchstart"in globalThis,i.supportsPointerEvents=!!globalThis.PointerEvent,i.onPointerUp=i.onPointerUp.bind(i),i.processPointerUp=i.processPointerUp.bind(i),i.onPointerCancel=i.onPointerCancel.bind(i),i.processPointerCancel=i.processPointerCancel.bind(i),i.onPointerDown=i.onPointerDown.bind(i),i.processPointerDown=i.processPointerDown.bind(i),i.onPointerMove=i.onPointerMove.bind(i),i.processPointerMove=i.processPointerMove.bind(i),i.onPointerOut=i.onPointerOut.bind(i),i.processPointerOverOut=i.processPointerOverOut.bind(i),i.onPointerOver=i.onPointerOver.bind(i),i.cursorStyles={default:"inherit",pointer:"pointer"},i.currentCursorMode=null,i.cursor=null,i.resolution=1,i.delayedEvents=[],i.search=new Tve,i._tempDisplayObject=new ZS,i._eventListenerOptions={capture:!0,passive:!1},i._useSystemTicker=n.useSystemTicker!==void 0?n.useSystemTicker:!0,i.setTargetElement(i.renderer.view,i.renderer.resolution),i}return Object.defineProperty(e.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(r){this._useSystemTicker=r,r?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),e.prototype.hitTest=function(r,n){return Dh.target=null,Dh.data.global=r,n||(n=this.lastObjectRendered),this.processInteractive(Dh,n,null,!0),Dh.target},e.prototype.setTargetElement=function(r,n){n===void 0&&(n=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=r,this.resolution=n,this.addEvents(),this.addTickerListener()},e.prototype.addTickerListener=function(){this.tickerAdded||!this.interactionDOMElement||!this._useSystemTicker||(Or.system.add(this.tickerUpdate,this,ra.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(Or.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},e.prototype.addEvents=function(){if(!(this.eventsAdded||!this.interactionDOMElement)){var r=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="none",r.msTouchAction="none"):this.supportsPointerEvents&&(r.touchAction="none"),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},e.prototype.removeEvents=function(){if(!(!this.eventsAdded||!this.interactionDOMElement)){var r=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="",r.msTouchAction=""):this.supportsPointerEvents&&(r.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},e.prototype.tickerUpdate=function(r){this._deltaTime+=r,!(this._deltaTime0&&(s=r.composedPath()[0]);for(var u=s!==this.interactionDOMElement?"outside":"",l=0;l"u"&&(o.button=r.touches.length?1:0),typeof o.buttons>"u"&&(o.buttons=r.touches.length?1:0),typeof o.isPrimary>"u"&&(o.isPrimary=r.touches.length===1&&r.type==="touchstart"),typeof o.width>"u"&&(o.width=o.radiusX||1),typeof o.height>"u"&&(o.height=o.radiusY||1),typeof o.tiltX>"u"&&(o.tiltX=0),typeof o.tiltY>"u"&&(o.tiltY=0),typeof o.pointerType>"u"&&(o.pointerType="touch"),typeof o.pointerId>"u"&&(o.pointerId=o.identifier||0),typeof o.pressure>"u"&&(o.pressure=o.force||.5),typeof o.twist>"u"&&(o.twist=0),typeof o.tangentialPressure>"u"&&(o.tangentialPressure=0),typeof o.layerX>"u"&&(o.layerX=o.offsetX=o.clientX),typeof o.layerY>"u"&&(o.layerY=o.offsetY=o.clientY),o.isNormalized=!0,n.push(o)}else if(!globalThis.MouseEvent||r instanceof MouseEvent&&(!this.supportsPointerEvents||!(r instanceof globalThis.PointerEvent))){var s=r;typeof s.isPrimary>"u"&&(s.isPrimary=!0),typeof s.width>"u"&&(s.width=1),typeof s.height>"u"&&(s.height=1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="mouse"),typeof s.pointerId>"u"&&(s.pointerId=Lh),typeof s.pressure>"u"&&(s.pressure=.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),s.isNormalized=!0,n.push(s)}else n.push(r);return n},e.prototype.destroy=function(){this.removeEvents(),this.removeTickerListener(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.search=null},e.extension={name:"interaction",type:[dt.RendererPlugin,dt.CanvasRendererPlugin]},e}(mu);/*! * @pixi/extract - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/extract is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */var Tve=new Ye,Ave=4,tD=function(){function t(e){this.renderer=e}return t.prototype.image=function(e,r,n){var i=new Image;return i.src=this.base64(e,r,n),i},t.prototype.base64=function(e,r,n){return this.canvas(e).toDataURL(r,n)},t.prototype.canvas=function(e,r){var n=this._rawPixels(e,r),i=n.pixels,a=n.width,o=n.height,s=n.flipY,u=new D_(a,o,1),l=u.context.getImageData(0,0,a,o);if(t.arrayPostDivide(i,l.data),u.context.putImageData(l,0,0),s){var c=new D_(u.width,u.height,1);c.context.scale(1,-1),c.context.drawImage(u.canvas,0,-o),u.destroy(),u=c}return u.canvas},t.prototype.pixels=function(e,r){var n=this._rawPixels(e,r).pixels;return t.arrayPostDivide(n,n),n},t.prototype._rawPixels=function(e,r){var n=this.renderer,i,a=!1,o,s=!1;if(e)if(e instanceof Co)o=e;else{var u=n.context.webGLVersion>=2?n.multisample:Ot.NONE;if(o=this.renderer.generateTexture(e,{multisample:u}),u!==Ot.NONE){var l=Co.create({width:o.width,height:o.height});n.framebuffer.bind(o.framebuffer),n.framebuffer.blit(l.framebuffer),n.framebuffer.bind(null),o.destroy(!0),o=l}s=!0}o?(i=o.baseTexture.resolution,r=r??o.frame,a=!1,n.renderTexture.bind(o)):(i=n.resolution,r||(r=Tve,r.width=n.width,r.height=n.height),a=!0,n.renderTexture.bind(null));var c=Math.round(r.width*i),f=Math.round(r.height*i),h=new Uint8Array(Ave*c*f),d=n.gl;return d.readPixels(Math.round(r.x*i),Math.round(r.y*i),c,f,d.RGBA,d.UNSIGNED_BYTE,h),s&&o.destroy(!0),{pixels:h,width:c,height:f,flipY:a}},t.prototype.destroy=function(){this.renderer=null},t.arrayPostDivide=function(e,r){for(var n=0;n=2?n.multisample:Ot.NONE;if(o=this.renderer.generateTexture(e,{multisample:u}),u!==Ot.NONE){var l=Co.create({width:o.width,height:o.height});n.framebuffer.bind(o.framebuffer),n.framebuffer.blit(l.framebuffer),n.framebuffer.bind(null),o.destroy(!0),o=l}s=!0}o?(i=o.baseTexture.resolution,r=r??o.frame,a=!1,n.renderTexture.bind(o)):(i=n.resolution,r||(r=Ave,r.width=n.width,r.height=n.height),a=!0,n.renderTexture.bind(null));var c=Math.round(r.width*i),f=Math.round(r.height*i),h=new Uint8Array(Cve*c*f),d=n.gl;return d.readPixels(Math.round(r.x*i),Math.round(r.y*i),c,f,d.RGBA,d.UNSIGNED_BYTE,h),s&&o.destroy(!0),{pixels:h,width:c,height:f,flipY:a}},t.prototype.destroy=function(){this.renderer=null},t.arrayPostDivide=function(e,r){for(var n=0;n"u"&&(Ry=!!(globalThis.XDomainRequest&&!("withCredentials"in new XMLHttpRequest))),Ry&&this.crossOrigin?this._loadXdr():this._loadXhr();break}}},t.prototype._hasFlag=function(e){return(this._flags&e)!==0},t.prototype._setFlag=function(e,r){this._flags=r?this._flags|e:this._flags&~e},t.prototype._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},t.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype._loadElement=function(e){this.metadata.loadElement?this.data=this.metadata.loadElement:e==="image"&&typeof globalThis.Image<"u"?this.data=new Image:this.data=document.createElement(e),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},t.prototype._loadSourceElement=function(e){if(this.metadata.loadElement?this.data=this.metadata.loadElement:e==="audio"&&typeof globalThis.Audio<"u"?this.data=new Audio:this.data=document.createElement(e),this.data===null){this.abort("Unsupported element: "+e);return}if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var r=this.metadata.mimeType,n=0;n"u"?K2:e.status;(e.responseType===""||e.responseType==="text"||typeof e.responseType>"u")&&(r=e.responseText),n===Cve&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?n=K2:n===Ove&&(n=Pve);var i=n/100|0;if(i===Rve)if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(s){this.abort("Error trying to parse loaded json: "+s);return}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(globalThis.DOMParser){var a=new DOMParser;this.data=a.parseFromString(r,"text/xml")}else{var o=document.createElement("div");o.innerHTML=r,this.data=o}this.type=t.TYPE.XML}catch(s){this.abort("Error trying to parse loaded xml: "+s);return}else this.data=e.response||r;else{this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL);return}this.complete()},t.prototype._determineCrossOrigin=function(e,r){if(e.indexOf("data:")===0)return"";if(globalThis.origin!==globalThis.location.origin)return"anonymous";r=r||globalThis.location,jh||(jh=document.createElement("a")),jh.href=e;var n=rD(jh.href,{strictMode:!0}),i=!n.port&&r.port===""||n.port===r.port,a=n.protocol?n.protocol+":":"";return n.host!==r.hostname||!i||a!==r.protocol?"anonymous":""},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(e){e===void 0&&(e=this.url);var r="";if(this.isDataUrl){var n=e.indexOf("/");r=e.substring(n+1,e.indexOf(";",n))}else{var i=e.indexOf("?"),a=e.indexOf("#"),o=Math.min(i>-1?i:e.length,a>-1?a:e.length);e=e.substring(0,o),r=e.substring(e.lastIndexOf(".")+1)}return r.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},t}();(function(t){(function(e){e[e.NONE=0]="NONE",e[e.DATA_URL=1]="DATA_URL",e[e.COMPLETE=2]="COMPLETE",e[e.LOADING=4]="LOADING"})(t.STATUS_FLAGS||(t.STATUS_FLAGS={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.JSON=1]="JSON",e[e.XML=2]="XML",e[e.IMAGE=3]="IMAGE",e[e.AUDIO=4]="AUDIO",e[e.VIDEO=5]="VIDEO",e[e.TEXT=6]="TEXT"}(t.TYPE||(t.TYPE={})),function(e){e[e.XHR=1]="XHR",e[e.IMAGE=2]="IMAGE",e[e.AUDIO=3]="AUDIO",e[e.VIDEO=4]="VIDEO"}(t.LOAD_TYPE||(t.LOAD_TYPE={})),function(e){e.DEFAULT="text",e.BUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.TEXT="text"}(t.XHR_RESPONSE_TYPE||(t.XHR_RESPONSE_TYPE={})),t._loadTypeMap={gif:t.LOAD_TYPE.IMAGE,png:t.LOAD_TYPE.IMAGE,bmp:t.LOAD_TYPE.IMAGE,jpg:t.LOAD_TYPE.IMAGE,jpeg:t.LOAD_TYPE.IMAGE,tif:t.LOAD_TYPE.IMAGE,tiff:t.LOAD_TYPE.IMAGE,webp:t.LOAD_TYPE.IMAGE,tga:t.LOAD_TYPE.IMAGE,avif:t.LOAD_TYPE.IMAGE,svg:t.LOAD_TYPE.IMAGE,"svg+xml":t.LOAD_TYPE.IMAGE,mp3:t.LOAD_TYPE.AUDIO,ogg:t.LOAD_TYPE.AUDIO,wav:t.LOAD_TYPE.AUDIO,mp4:t.LOAD_TYPE.VIDEO,webm:t.LOAD_TYPE.VIDEO},t._xhrTypeMap={xhtml:t.XHR_RESPONSE_TYPE.DOCUMENT,html:t.XHR_RESPONSE_TYPE.DOCUMENT,htm:t.XHR_RESPONSE_TYPE.DOCUMENT,xml:t.XHR_RESPONSE_TYPE.DOCUMENT,tmx:t.XHR_RESPONSE_TYPE.DOCUMENT,svg:t.XHR_RESPONSE_TYPE.DOCUMENT,tsx:t.XHR_RESPONSE_TYPE.DOCUMENT,gif:t.XHR_RESPONSE_TYPE.BLOB,png:t.XHR_RESPONSE_TYPE.BLOB,bmp:t.XHR_RESPONSE_TYPE.BLOB,jpg:t.XHR_RESPONSE_TYPE.BLOB,jpeg:t.XHR_RESPONSE_TYPE.BLOB,tif:t.XHR_RESPONSE_TYPE.BLOB,tiff:t.XHR_RESPONSE_TYPE.BLOB,webp:t.XHR_RESPONSE_TYPE.BLOB,tga:t.XHR_RESPONSE_TYPE.BLOB,avif:t.XHR_RESPONSE_TYPE.BLOB,json:t.XHR_RESPONSE_TYPE.JSON,text:t.XHR_RESPONSE_TYPE.TEXT,txt:t.XHR_RESPONSE_TYPE.TEXT,ttf:t.XHR_RESPONSE_TYPE.BUFFER,otf:t.XHR_RESPONSE_TYPE.BUFFER},t.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="})(mt||(mt={}));function Do(){}function Ive(t){return function(){for(var r=arguments,n=[],i=0;i>2,i[1]=(n[0]&3)<<4|n[1]>>4,i[2]=(n[1]&15)<<2|n[2]>>6,i[3]=n[2]&63;var o=r-(t.length-1);switch(o){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64;break}for(var a=0;a"u"&&(Ry=!!(globalThis.XDomainRequest&&!("withCredentials"in new XMLHttpRequest))),Ry&&this.crossOrigin?this._loadXdr():this._loadXhr();break}}},t.prototype._hasFlag=function(e){return(this._flags&e)!==0},t.prototype._setFlag=function(e,r){this._flags=r?this._flags|e:this._flags&~e},t.prototype._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},t.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype._loadElement=function(e){this.metadata.loadElement?this.data=this.metadata.loadElement:e==="image"&&typeof globalThis.Image<"u"?this.data=new Image:this.data=document.createElement(e),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},t.prototype._loadSourceElement=function(e){if(this.metadata.loadElement?this.data=this.metadata.loadElement:e==="audio"&&typeof globalThis.Audio<"u"?this.data=new Audio:this.data=document.createElement(e),this.data===null){this.abort("Unsupported element: "+e);return}if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var r=this.metadata.mimeType,n=0;n"u"?Z2:e.status;(e.responseType===""||e.responseType==="text"||typeof e.responseType>"u")&&(r=e.responseText),n===Pve&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?n=Z2:n===Rve&&(n=Ove);var i=n/100|0;if(i===Ive)if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(s){this.abort("Error trying to parse loaded json: "+s);return}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(globalThis.DOMParser){var a=new DOMParser;this.data=a.parseFromString(r,"text/xml")}else{var o=document.createElement("div");o.innerHTML=r,this.data=o}this.type=t.TYPE.XML}catch(s){this.abort("Error trying to parse loaded xml: "+s);return}else this.data=e.response||r;else{this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL);return}this.complete()},t.prototype._determineCrossOrigin=function(e,r){if(e.indexOf("data:")===0)return"";if(globalThis.origin!==globalThis.location.origin)return"anonymous";r=r||globalThis.location,jh||(jh=document.createElement("a")),jh.href=e;var n=nD(jh.href,{strictMode:!0}),i=!n.port&&r.port===""||n.port===r.port,a=n.protocol?n.protocol+":":"";return n.host!==r.hostname||!i||a!==r.protocol?"anonymous":""},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(e){e===void 0&&(e=this.url);var r="";if(this.isDataUrl){var n=e.indexOf("/");r=e.substring(n+1,e.indexOf(";",n))}else{var i=e.indexOf("?"),a=e.indexOf("#"),o=Math.min(i>-1?i:e.length,a>-1?a:e.length);e=e.substring(0,o),r=e.substring(e.lastIndexOf(".")+1)}return r.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},t}();(function(t){(function(e){e[e.NONE=0]="NONE",e[e.DATA_URL=1]="DATA_URL",e[e.COMPLETE=2]="COMPLETE",e[e.LOADING=4]="LOADING"})(t.STATUS_FLAGS||(t.STATUS_FLAGS={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.JSON=1]="JSON",e[e.XML=2]="XML",e[e.IMAGE=3]="IMAGE",e[e.AUDIO=4]="AUDIO",e[e.VIDEO=5]="VIDEO",e[e.TEXT=6]="TEXT"}(t.TYPE||(t.TYPE={})),function(e){e[e.XHR=1]="XHR",e[e.IMAGE=2]="IMAGE",e[e.AUDIO=3]="AUDIO",e[e.VIDEO=4]="VIDEO"}(t.LOAD_TYPE||(t.LOAD_TYPE={})),function(e){e.DEFAULT="text",e.BUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.TEXT="text"}(t.XHR_RESPONSE_TYPE||(t.XHR_RESPONSE_TYPE={})),t._loadTypeMap={gif:t.LOAD_TYPE.IMAGE,png:t.LOAD_TYPE.IMAGE,bmp:t.LOAD_TYPE.IMAGE,jpg:t.LOAD_TYPE.IMAGE,jpeg:t.LOAD_TYPE.IMAGE,tif:t.LOAD_TYPE.IMAGE,tiff:t.LOAD_TYPE.IMAGE,webp:t.LOAD_TYPE.IMAGE,tga:t.LOAD_TYPE.IMAGE,avif:t.LOAD_TYPE.IMAGE,svg:t.LOAD_TYPE.IMAGE,"svg+xml":t.LOAD_TYPE.IMAGE,mp3:t.LOAD_TYPE.AUDIO,ogg:t.LOAD_TYPE.AUDIO,wav:t.LOAD_TYPE.AUDIO,mp4:t.LOAD_TYPE.VIDEO,webm:t.LOAD_TYPE.VIDEO},t._xhrTypeMap={xhtml:t.XHR_RESPONSE_TYPE.DOCUMENT,html:t.XHR_RESPONSE_TYPE.DOCUMENT,htm:t.XHR_RESPONSE_TYPE.DOCUMENT,xml:t.XHR_RESPONSE_TYPE.DOCUMENT,tmx:t.XHR_RESPONSE_TYPE.DOCUMENT,svg:t.XHR_RESPONSE_TYPE.DOCUMENT,tsx:t.XHR_RESPONSE_TYPE.DOCUMENT,gif:t.XHR_RESPONSE_TYPE.BLOB,png:t.XHR_RESPONSE_TYPE.BLOB,bmp:t.XHR_RESPONSE_TYPE.BLOB,jpg:t.XHR_RESPONSE_TYPE.BLOB,jpeg:t.XHR_RESPONSE_TYPE.BLOB,tif:t.XHR_RESPONSE_TYPE.BLOB,tiff:t.XHR_RESPONSE_TYPE.BLOB,webp:t.XHR_RESPONSE_TYPE.BLOB,tga:t.XHR_RESPONSE_TYPE.BLOB,avif:t.XHR_RESPONSE_TYPE.BLOB,json:t.XHR_RESPONSE_TYPE.JSON,text:t.XHR_RESPONSE_TYPE.TEXT,txt:t.XHR_RESPONSE_TYPE.TEXT,ttf:t.XHR_RESPONSE_TYPE.BUFFER,otf:t.XHR_RESPONSE_TYPE.BUFFER},t.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="})(mt||(mt={}));function Do(){}function kve(t){return function(){for(var r=arguments,n=[],i=0;i>2,i[1]=(n[0]&3)<<4|n[1]>>4,i[2]=(n[1]&15)<<2|n[2]>>6,i[3]=n[2]&63;var o=r-(t.length-1);switch(o){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64;break}for(var a=0;a0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]=33776&&r<=33779)return"s3tc";if(r>=37488&&r<=37497)return"etc";if(r>=35840&&r<=35843)return"pvrtc";if(r>=36196)return"etc1";if(r>=35986&&r<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")},e._createLevelBuffers=function(r,n,i,a,o,s,u){for(var l=new Array(i),c=r.byteOffset,f=s,h=u,d=f+a-1&~(a-1),p=h+o-1&~(o-1),v=d*p*df[n],g=0;g1?f:d,levelHeight:i>1?h:p,levelBuffer:new Uint8Array(r.buffer,c,v)},c+=v,f=f>>1||1,h=h>>1||1,d=f+a-1&~(a-1),p=h+o-1&~(o-1),v=d*p*df[n];return l},e}(oD),sD=function(){function t(){}return t.use=function(e,r){var n=e.data,i=this;if(e.type===mt.TYPE.JSON&&n&&n.cacheID&&n.textures){for(var a=n.textures,o=void 0,s=void 0,u=0,l=a.length;u>>1,A=A>>>1}for(var B=S,O=0;O<_;O++)b.push(new Uint8Array(t,B,E)),B+=E}return b.map(function(j){return new Ep(j,{format:x,width:a,height:i,levels:o})})}throw u&Wve?new Error("DDSParser does not support uncompressed texture data."):u&Yve?new Error("DDSParser does not supported YUV uncompressed texture data."):u&Hve?new Error("DDSParser does not support single-channel (lumninance) texture data!"):u&Xve?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}var Va,_a,Wu,eO=[171,75,84,88,32,49,49,187,13,10,26,10],rme=67305985,ci={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},Y_=64,H_=(Va={},Va[Re.UNSIGNED_BYTE]=1,Va[Re.UNSIGNED_SHORT]=2,Va[Re.INT]=4,Va[Re.UNSIGNED_INT]=4,Va[Re.FLOAT]=4,Va[Re.HALF_FLOAT]=8,Va),cD=(_a={},_a[ve.RGBA]=4,_a[ve.RGB]=3,_a[ve.RG]=2,_a[ve.RED]=1,_a[ve.LUMINANCE]=1,_a[ve.LUMINANCE_ALPHA]=2,_a[ve.ALPHA]=1,_a),fD=(Wu={},Wu[Re.UNSIGNED_SHORT_4_4_4_4]=2,Wu[Re.UNSIGNED_SHORT_5_5_5_1]=2,Wu[Re.UNSIGNED_SHORT_5_6_5]=2,Wu);function hD(t,e,r){r===void 0&&(r=!1);var n=new DataView(e);if(!nme(t,n))return null;var i=n.getUint32(ci.ENDIANNESS,!0)===rme,a=n.getUint32(ci.GL_TYPE,i),o=n.getUint32(ci.GL_FORMAT,i),s=n.getUint32(ci.GL_INTERNAL_FORMAT,i),u=n.getUint32(ci.PIXEL_WIDTH,i),l=n.getUint32(ci.PIXEL_HEIGHT,i)||1,c=n.getUint32(ci.PIXEL_DEPTH,i)||1,f=n.getUint32(ci.NUMBER_OF_ARRAY_ELEMENTS,i)||1,h=n.getUint32(ci.NUMBER_OF_FACES,i),d=n.getUint32(ci.NUMBER_OF_MIPMAP_LEVELS,i),p=n.getUint32(ci.BYTES_OF_KEY_VALUE_DATA,i);if(l===0||c!==1)throw new Error("Only 2D textures are supported");if(h!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(f!==1)throw new Error("WebGL does not support array textures");var v=4,g=4,m=u+3&-4,y=l+3&-4,_=new Array(f),x=u*l;a===0&&(x=m*y);var b;if(a!==0?H_[a]?b=H_[a]*cD[o]:b=fD[a]:b=df[s],b===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");for(var S=r?ame(n,p,i):null,w=x*b,E=w,T=u,A=l,O=m,P=y,k=Y_+p,M=0;M1||a!==0?T:O,levelHeight:d>1||a!==0?A:P,levelBuffer:new Uint8Array(e,j,E)},j+=E}k+=B+4,k=k%4!==0?k+4-k%4:k,T=T>>1||1,A=A>>1||1,O=T+v-1&~(v-1),P=A+g-1&~(g-1),E=O*P*b}return a!==0?{uncompressed:_.map(function(Z){var $=Z[0].levelBuffer,F=!1;return a===Re.FLOAT?$=new Float32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4):a===Re.UNSIGNED_INT?(F=!0,$=new Uint32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4)):a===Re.INT&&(F=!0,$=new Int32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4)),{resource:new Ms($,{width:Z[0].levelWidth,height:Z[0].levelHeight}),type:a,format:F?ime(o):o}}),kvData:S}:{compressed:_.map(function(Z){return new Ep(null,{format:s,width:u,height:l,levels:d,levelBuffers:Z})}),kvData:S}}function nme(t,e){for(var r=0;re-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}for(var u=0;u0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]=33776&&r<=33779)return"s3tc";if(r>=37488&&r<=37497)return"etc";if(r>=35840&&r<=35843)return"pvrtc";if(r>=36196)return"etc1";if(r>=35986&&r<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")},e._createLevelBuffers=function(r,n,i,a,o,s,u){for(var l=new Array(i),c=r.byteOffset,f=s,h=u,d=f+a-1&~(a-1),p=h+o-1&~(o-1),v=d*p*df[n],g=0;g1?f:d,levelHeight:i>1?h:p,levelBuffer:new Uint8Array(r.buffer,c,v)},c+=v,f=f>>1||1,h=h>>1||1,d=f+a-1&~(a-1),p=h+o-1&~(o-1),v=d*p*df[n];return l},e}(sD),lD=function(){function t(){}return t.use=function(e,r){var n=e.data,i=this;if(e.type===mt.TYPE.JSON&&n&&n.cacheID&&n.textures){for(var a=n.textures,o=void 0,s=void 0,u=0,l=a.length;u>>1,A=A>>>1}for(var B=S,O=0;O<_;O++)b.push(new Uint8Array(t,B,E)),B+=E}return b.map(function(j){return new Ep(j,{format:x,width:a,height:i,levels:o})})}throw u&Yve?new Error("DDSParser does not support uncompressed texture data."):u&Hve?new Error("DDSParser does not supported YUV uncompressed texture data."):u&qve?new Error("DDSParser does not support single-channel (lumninance) texture data!"):u&zve?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}var Va,_a,Wu,tO=[171,75,84,88,32,49,49,187,13,10,26,10],nme=67305985,ci={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},H_=64,q_=(Va={},Va[Re.UNSIGNED_BYTE]=1,Va[Re.UNSIGNED_SHORT]=2,Va[Re.INT]=4,Va[Re.UNSIGNED_INT]=4,Va[Re.FLOAT]=4,Va[Re.HALF_FLOAT]=8,Va),fD=(_a={},_a[ve.RGBA]=4,_a[ve.RGB]=3,_a[ve.RG]=2,_a[ve.RED]=1,_a[ve.LUMINANCE]=1,_a[ve.LUMINANCE_ALPHA]=2,_a[ve.ALPHA]=1,_a),hD=(Wu={},Wu[Re.UNSIGNED_SHORT_4_4_4_4]=2,Wu[Re.UNSIGNED_SHORT_5_5_5_1]=2,Wu[Re.UNSIGNED_SHORT_5_6_5]=2,Wu);function dD(t,e,r){r===void 0&&(r=!1);var n=new DataView(e);if(!ime(t,n))return null;var i=n.getUint32(ci.ENDIANNESS,!0)===nme,a=n.getUint32(ci.GL_TYPE,i),o=n.getUint32(ci.GL_FORMAT,i),s=n.getUint32(ci.GL_INTERNAL_FORMAT,i),u=n.getUint32(ci.PIXEL_WIDTH,i),l=n.getUint32(ci.PIXEL_HEIGHT,i)||1,c=n.getUint32(ci.PIXEL_DEPTH,i)||1,f=n.getUint32(ci.NUMBER_OF_ARRAY_ELEMENTS,i)||1,h=n.getUint32(ci.NUMBER_OF_FACES,i),d=n.getUint32(ci.NUMBER_OF_MIPMAP_LEVELS,i),p=n.getUint32(ci.BYTES_OF_KEY_VALUE_DATA,i);if(l===0||c!==1)throw new Error("Only 2D textures are supported");if(h!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(f!==1)throw new Error("WebGL does not support array textures");var v=4,g=4,m=u+3&-4,y=l+3&-4,_=new Array(f),x=u*l;a===0&&(x=m*y);var b;if(a!==0?q_[a]?b=q_[a]*fD[o]:b=hD[a]:b=df[s],b===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");for(var S=r?ome(n,p,i):null,w=x*b,E=w,T=u,A=l,O=m,P=y,k=H_+p,M=0;M1||a!==0?T:O,levelHeight:d>1||a!==0?A:P,levelBuffer:new Uint8Array(e,j,E)},j+=E}k+=B+4,k=k%4!==0?k+4-k%4:k,T=T>>1||1,A=A>>1||1,O=T+v-1&~(v-1),P=A+g-1&~(g-1),E=O*P*b}return a!==0?{uncompressed:_.map(function(Z){var $=Z[0].levelBuffer,F=!1;return a===Re.FLOAT?$=new Float32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4):a===Re.UNSIGNED_INT?(F=!0,$=new Uint32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4)):a===Re.INT&&(F=!0,$=new Int32Array(Z[0].levelBuffer.buffer,Z[0].levelBuffer.byteOffset,Z[0].levelBuffer.byteLength/4)),{resource:new Ms($,{width:Z[0].levelWidth,height:Z[0].levelHeight}),type:a,format:F?ame(o):o}}),kvData:S}:{compressed:_.map(function(Z){return new Ep(null,{format:s,width:u,height:l,levels:d,levelBuffers:Z})}),kvData:S}}function ime(t,e){for(var r=0;re-i){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}for(var u=0;us&&(i=s),o._properties=[!1,!0,!1,!1,!1],o._maxSize=r,o._batchSize=i,o._buffers=null,o._bufferUpdateIDs=[],o._updateID=0,o.interactiveChildren=!1,o.blendMode=Se.NORMAL,o.autoResize=a,o.roundPixels=!0,o.baseTexture=null,o.setProperties(n),o._tint=0,o.tintRgb=new Float32Array(4),o.tint=16777215,o}return e.prototype.setProperties=function(r){r&&(this._properties[0]="vertices"in r||"scale"in r?!!r.vertices||!!r.scale:this._properties[0],this._properties[1]="position"in r?!!r.position:this._properties[1],this._properties[2]="rotation"in r?!!r.rotation:this._properties[2],this._properties[3]="uvs"in r?!!r.uvs:this._properties[3],this._properties[4]="tint"in r||"alpha"in r?!!r.tint||!!r.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(r){this._tint=r,gr(r,this.tintRgb)},enumerable:!1,configurable:!0}),e.prototype.render=function(r){var n=this;!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return n.onChildrenChange(0)})),r.batch.setObjectRenderer(r.plugins.particle),r.plugins.particle.render(this))},e.prototype.onChildrenChange=function(r){for(var n=Math.floor(r/this._batchSize);this._bufferUpdateIDs.lengths&&(i=s),o._properties=[!1,!0,!1,!1,!1],o._maxSize=r,o._batchSize=i,o._buffers=null,o._bufferUpdateIDs=[],o._updateID=0,o.interactiveChildren=!1,o.blendMode=Se.NORMAL,o.autoResize=a,o.roundPixels=!0,o.baseTexture=null,o.setProperties(n),o._tint=0,o.tintRgb=new Float32Array(4),o.tint=16777215,o}return e.prototype.setProperties=function(r){r&&(this._properties[0]="vertices"in r||"scale"in r?!!r.vertices||!!r.scale:this._properties[0],this._properties[1]="position"in r?!!r.position:this._properties[1],this._properties[2]="rotation"in r?!!r.rotation:this._properties[2],this._properties[3]="uvs"in r?!!r.uvs:this._properties[3],this._properties[4]="tint"in r||"alpha"in r?!!r.tint||!!r.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(r){this._tint=r,yr(r,this.tintRgb)},enumerable:!1,configurable:!0}),e.prototype.render=function(r){var n=this;!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return n.onChildrenChange(0)})),r.batch.setObjectRenderer(r.plugins.particle),r.plugins.particle.render(this))},e.prototype.onChildrenChange=function(r){for(var n=Math.floor(r/this._batchSize);this._bufferUpdateIDs.lengthi&&!r.autoResize&&(s=i);var u=r._buffers;u||(u=r._buffers=this.generateBuffers(r));var l=n[0]._texture.baseTexture,c=l.alphaMode>0;this.state.blendMode=YS(r.blendMode,c),o.state.set(this.state);var f=o.gl,h=r.worldTransform.copyTo(this.tempMatrix);h.prepend(o.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=uL(r.tintRgb,r.worldAlpha,this.shader.uniforms.uColor,c),this.shader.uniforms.uSampler=l,this.renderer.shader.bind(this.shader);for(var d=!1,p=0,v=0;pa&&(g=a),v>=u.length&&u.push(this._generateOneMoreBuffer(r));var m=u[v];m.uploadDynamic(n,p,g);var y=r._bufferUpdateIDs[v]||0;d=d||m._updateID0,f=l.alpha,h=f<1&&c?im(l._tintRGB,f):l._tintRGB+(f*255<<24);a[s]=h,a[s+o]=h,a[s+o*2]=h,a[s+o*3]=h,s+=o*4}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e.extension={name:"particle",type:dt.RendererPlugin},e}(qf);/*! +`,gD=function(t){mD(e,t);function e(r){var n=t.call(this,r)||this;return n.shader=null,n.properties=null,n.tempMatrix=new Ut,n.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:n.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:n.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:n.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:n.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:Re.UNSIGNED_BYTE,uploadFunction:n.uploadTint,offset:0}],n.shader=Ma.from(ume,lme,{}),n.state=Mo.for2d(),n}return e.prototype.render=function(r){var n=r.children,i=r._maxSize,a=r._batchSize,o=this.renderer,s=n.length;if(s!==0){s>i&&!r.autoResize&&(s=i);var u=r._buffers;u||(u=r._buffers=this.generateBuffers(r));var l=n[0]._texture.baseTexture,c=l.alphaMode>0;this.state.blendMode=HS(r.blendMode,c),o.state.set(this.state);var f=o.gl,h=r.worldTransform.copyTo(this.tempMatrix);h.prepend(o.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=cL(r.tintRgb,r.worldAlpha,this.shader.uniforms.uColor,c),this.shader.uniforms.uSampler=l,this.renderer.shader.bind(this.shader);for(var d=!1,p=0,v=0;pa&&(g=a),v>=u.length&&u.push(this._generateOneMoreBuffer(r));var m=u[v];m.uploadDynamic(n,p,g);var y=r._bufferUpdateIDs[v]||0;d=d||m._updateID0,f=l.alpha,h=f<1&&c?im(l._tintRGB,f):l._tintRGB+(f*255<<24);a[s]=h,a[s+o]=h,a[s+o*2]=h,a[s+o*3]=h,s+=o*4}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e.extension={name:"particle",type:dt.RendererPlugin},e}(qf);/*! * @pixi/graphics - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/graphics is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */var Gi;(function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"})(Gi||(Gi={}));var Ra;(function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"})(Ra||(Ra={}));var Xl={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(e===void 0&&(e=20),!this.adaptive||!t||isNaN(t))return e;var r=Math.ceil(t/this.maxLength);return rthis.maxSegments&&(r=this.maxSegments),r}},Tw=function(){function t(){this.color=16777215,this.alpha=1,this.texture=Me.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=Me.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}();/*! ***************************************************************************** + */var Gi;(function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"})(Gi||(Gi={}));var Ra;(function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"})(Ra||(Ra={}));var Xl={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(e===void 0&&(e=20),!this.adaptive||!t||isNaN(t))return e;var r=Math.ceil(t/this.maxLength);return rthis.maxSegments&&(r=this.maxSegments),r}},Aw=function(){function t(){this.color=16777215,this.alpha=1,this.texture=Me.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=Me.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}();/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -805,7 +805,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var K_=function(t,e){return K_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},K_(t,e)};function Aw(t,e){K_(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function rO(t,e){var r,n;e===void 0&&(e=!1);var i=t.length;if(!(i<6)){for(var a=0,o=0,s=t[i-2],u=t[i-1];o0||e&&a<=0)for(var f=i/2,o=f+f%2;o=6){rO(r,!1);for(var o=[],s=0;s=0&&s>=0&&i>=0&&a>=0)){e.length=0;return}var d=Math.ceil(2.3*Math.sqrt(o+s)),p=d*8+(i?4:0)+(a?4:0);if(e.length=p,p!==0){if(d===0){e.length=8,e[0]=e[6]=r+i,e[1]=e[3]=n+a,e[2]=e[4]=r-i,e[5]=e[7]=n-a;return}var v=0,g=d*4+(i?2:0)+2,m=g,y=p;{var _=i+o,x=a,b=r+_,S=r-_,w=n+x;if(e[v++]=b,e[v++]=w,e[--g]=w,e[--g]=S,a){var E=n-x;e[m++]=S,e[m++]=E,e[--y]=E,e[--y]=b}}for(var T=1;Tf&&(f+=Math.PI*2);var h=c,d=f-c,p=Math.abs(d),v=Math.sqrt(u*u+l*l),g=(15*p*Math.sqrt(v)/Math.PI>>0)+1,m=d/g;if(h+=m,s){o.push(t,e),o.push(r,n);for(var y=1,_=h;y=0&&(a.join===Gi.ROUND?p+=Bo(b,S,b-T*B,S-A*B,b-O*B,S-P*B,h,!1)+4:p+=2,h.push(b-O*j,S-P*j),h.push(b+O*B,S+P*B));continue}var H=(-T+_)*(-A+S)-(-T+b)*(-A+x),ee=(-O+w)*(-P+S)-(-O+b)*(-P+E),ie=(J*ee-$*H)/V,ae=(F*H-Z*ee)/V,pe=(ie-b)*(ie-b)+(ae-S)*(ae-S),ye=b+(ie-b)*B,oe=S+(ae-S)*B,_e=b-(ie-b)*j,Ce=S-(ae-S)*j,be=Math.min(J*J+Z*Z,$*$+F*F),Oe=U?B:j,ke=be+Oe*Oe*m,we=pe<=ke;we?a.join===Gi.BEVEL||pe/m>y?(U?(h.push(ye,oe),h.push(b+T*j,S+A*j),h.push(ye,oe),h.push(b+O*j,S+P*j)):(h.push(b-T*B,S-A*B),h.push(_e,Ce),h.push(b-O*B,S-P*B),h.push(_e,Ce)),p+=2):a.join===Gi.ROUND?U?(h.push(ye,oe),h.push(b+T*j,S+A*j),p+=Bo(b,S,b+T*j,S+A*j,b+O*j,S+P*j,h,!0)+4,h.push(ye,oe),h.push(b+O*j,S+P*j)):(h.push(b-T*B,S-A*B),h.push(_e,Ce),p+=Bo(b,S,b-T*B,S-A*B,b-O*B,S-P*B,h,!1)+4,h.push(b-O*B,S-P*B),h.push(_e,Ce)):(h.push(ye,oe),h.push(_e,Ce)):(h.push(b-T*B,S-A*B),h.push(b+T*j,S+A*j),a.join===Gi.ROUND?U?p+=Bo(b,S,b+T*j,S+A*j,b+O*j,S+P*j,h,!0)+2:p+=Bo(b,S,b-T*B,S-A*B,b-O*B,S-P*B,h,!1)+2:a.join===Gi.MITER&&pe/m<=y&&(U?(h.push(_e,Ce),h.push(_e,Ce)):(h.push(ye,oe),h.push(ye,oe)),p+=2),h.push(b-O*B,S-P*B),h.push(b+O*j,S+P*j),p+=2)}_=n[(d-2)*2],x=n[(d-2)*2+1],b=n[(d-1)*2],S=n[(d-1)*2+1],T=-(x-S),A=_-b,k=Math.sqrt(T*T+A*A),T/=k,A/=k,T*=g,A*=g,h.push(b-T*B,S-A*B),h.push(b+T*j,S+A*j),u||(a.cap===Ra.ROUND?p+=Bo(b-T*(B-j)*.5,S-A*(B-j)*.5,b-T*B,S-A*B,b+T*j,S+A*j,h,!1)+2:a.cap===Ra.SQUARE&&(p+=nO(b,S,T,A,B,j,!1,h)));for(var Xe=e.indices,tt=Xl.epsilon*Xl.epsilon,z=v;zh*l}},t.arc=function(e,r,n,i,a,o,s,u,l){for(var c=s-o,f=Xl._segmentsCount(Math.abs(c)*a,Math.ceil(Math.abs(c)/cf)*40),h=c/(f*2),d=h*2,p=Math.cos(h),v=Math.sin(h),g=f-1,m=g%1/g,y=0;y<=g;++y){var _=y+m*y,x=h+o+d*_,b=Math.cos(x),S=-Math.sin(x);l.push((p*b+v*S)*a+n,(p*-S+v*b)*a+i)}},t}(),_D=function(){function t(){}return t.curveLength=function(e,r,n,i,a,o,s,u){for(var l=10,c=0,f=0,h=0,d=0,p=0,v=0,g=0,m=0,y=0,_=0,x=0,b=e,S=r,w=1;w<=l;++w)f=w/l,h=f*f,d=h*f,p=1-f,v=p*p,g=v*p,m=g*e+3*v*f*n+3*p*h*a+d*s,y=g*r+3*v*f*i+3*p*h*o+d*u,_=b-m,x=S-y,b=m,S=y,c+=Math.sqrt(_*_+x*x);return c},t.curveTo=function(e,r,n,i,a,o,s){var u=s[s.length-2],l=s[s.length-1];s.length-=2;var c=Xl._segmentsCount(t.curveLength(u,l,e,r,n,i,a,o)),f=0,h=0,d=0,p=0,v=0;s.push(u,l);for(var g=1,m=0;g<=c;++g)m=g/c,f=1-m,h=f*f,d=h*f,p=m*m,v=p*m,s.push(d*u+3*h*m*e+3*f*p*n+v*a,d*l+3*h*m*r+3*f*p*i+v*o)},t}(),xD=function(){function t(){}return t.curveLength=function(e,r,n,i,a,o){var s=e-2*n+a,u=r-2*i+o,l=2*n-2*e,c=2*i-2*r,f=4*(s*s+u*u),h=4*(s*l+u*c),d=l*l+c*c,p=2*Math.sqrt(f+h+d),v=Math.sqrt(f),g=2*f*v,m=2*Math.sqrt(d),y=h/v;return(g*p+v*h*(p-m)+(4*d*f-h*h)*Math.log((2*v+y+p)/(y+m)))/(4*g)},t.curveTo=function(e,r,n,i,a){for(var o=a[a.length-2],s=a[a.length-1],u=Xl._segmentsCount(t.curveLength(o,s,e,r,n,i)),l=0,c=0,f=1;f<=u;++f){var h=f/u;l=o+(e-o)*h,c=s+(r-s)*h,a.push(l+(e+(n-e)*h-l)*h,c+(r+(i-r)*h-c)*h)}},t}(),bD=function(){function t(){this.reset()}return t.prototype.begin=function(e,r,n){this.reset(),this.style=e,this.start=r,this.attribStart=n},t.prototype.end=function(e,r){this.attribSize=r-this.attribStart,this.size=e-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),jo,Td=(jo={},jo[pr.POLY]=Cw,jo[pr.CIRC]=pf,jo[pr.ELIP]=pf,jo[pr.RECT]=gD,jo[pr.RREC]=yD,jo),J_=[],lc=[],ex=function(){function t(e,r,n,i){r===void 0&&(r=null),n===void 0&&(n=null),i===void 0&&(i=null),this.points=[],this.holes=[],this.shape=e,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=e.type}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),Ys=new We,SD=function(t){Aw(e,t);function e(){var r=t.call(this)||this;return r.closePointEps=1e-4,r.boundsPadding=0,r.uvsFloat32=null,r.indicesUint16=null,r.batchable=!1,r.points=[],r.colors=[],r.uvs=[],r.indices=[],r.textureIds=[],r.graphicsData=[],r.drawCalls=[],r.batchDirty=-1,r.batches=[],r.dirty=0,r.cacheDirty=-1,r.clearDirty=0,r.shapeIndex=0,r._bounds=new ff,r.boundsDirty=-1,r}return Object.defineProperty(e.prototype,"bounds",{get:function(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){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(var r=0;r0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(r,n,i,a){n===void 0&&(n=null),i===void 0&&(i=null),a===void 0&&(a=null);var o=new ex(r,n,i,a);return this.graphicsData.push(o),this.dirty++,this},e.prototype.drawHole=function(r,n){if(n===void 0&&(n=null),!this.graphicsData.length)return null;var i=new ex(r,null,null,n),a=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=a.lineStyle,a.holes.push(i),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var r=0;r0&&(i=this.batches[this.batches.length-1],a=i.style);for(var o=this.shapeIndex;o65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&_===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=_?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}},e.prototype._compareStyles=function(r,n){return!(!r||!n||r.texture.baseTexture!==n.texture.baseTexture||r.color+r.alpha!==n.color+n.alpha||!!r.native!=!!n.native)},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var r=0,n=this.graphicsData.length;r65535*2)return!1;for(var r=this.batches,n=0;n0&&(o=lc.pop(),o||(o=new bp,o.texArray=new Sp),this.drawCalls.push(o)),o.start=h,o.size=0,o.texArray.count=0,o.type=f),g.touched=1,g._batchEnabled=r,g._batchLocation=s,g.wrapMode=xi.REPEAT,o.texArray.elements[o.texArray.count++]=g,s++)),o.size+=d.size,h+=d.size,l=g._batchLocation,this.addColors(i,v.color,v.alpha,d.attribSize,d.attribStart),this.addTextureIds(a,l,d.attribSize,d.attribStart)}Je._globalBatch=r,this.packAttributes()},e.prototype.packAttributes=function(){for(var r=this.points,n=this.uvs,i=this.colors,a=this.textureIds,o=new ArrayBuffer(r.length*3*4),s=new Float32Array(o),u=new Uint32Array(o),l=0,c=0;c>16)+(n&65280)+((n&255)<<16),u=im(s,i);r.length=Math.max(r.length,o+a);for(var l=0;l0&&r.alpha>0;return n?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._lineStyle,{visible:n},r)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var r=this.currentPath.points,n=this.currentPath.points.length;n>2&&(this.drawShape(this.currentPath),this.currentPath=new Pl,this.currentPath.closeStroke=!1,this.currentPath.points.push(r[n-2],r[n-1]))}else this.currentPath=new Pl,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(r,n){return this.startPoly(),this.currentPath.points[0]=r,this.currentPath.points[1]=n,this},e.prototype.lineTo=function(r,n){this.currentPath||this.moveTo(0,0);var i=this.currentPath.points,a=i[i.length-2],o=i[i.length-1];return(a!==r||o!==n)&&i.push(r,n),this},e.prototype._initCurve=function(r,n){r===void 0&&(r=0),n===void 0&&(n=0),this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[r,n]):this.moveTo(r,n)},e.prototype.quadraticCurveTo=function(r,n,i,a){this._initCurve();var o=this.currentPath.points;return o.length===0&&this.moveTo(0,0),xD.curveTo(r,n,i,a,o),this},e.prototype.bezierCurveTo=function(r,n,i,a,o,s){return this._initCurve(),_D.curveTo(r,n,i,a,o,s,this.currentPath.points),this},e.prototype.arcTo=function(r,n,i,a,o){this._initCurve(r,n);var s=this.currentPath.points,u=Q_.curveTo(r,n,i,a,o,s);if(u){var l=u.cx,c=u.cy,f=u.radius,h=u.startAngle,d=u.endAngle,p=u.anticlockwise;this.arc(l,c,f,h,d,p)}return this},e.prototype.arc=function(r,n,i,a,o,s){if(s===void 0&&(s=!1),a===o)return this;!s&&o<=a?o+=cf:s&&a<=o&&(a+=cf);var u=o-a;if(u===0)return this;var l=r+Math.cos(a)*i,c=n+Math.sin(a)*i,f=this._geometry.closePointEps,h=this.currentPath?this.currentPath.points:null;if(h){var d=Math.abs(h[h.length-2]-l),p=Math.abs(h[h.length-1]-c);d0;return n?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._fillStyle,{visible:n},r)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(r,n,i,a){return this.drawShape(new Ye(r,n,i,a))},e.prototype.drawRoundedRect=function(r,n,i,a,o){return this.drawShape(new yL(r,n,i,a,o))},e.prototype.drawCircle=function(r,n,i){return this.drawShape(new mL(r,n,i))},e.prototype.drawEllipse=function(r,n,i,a){return this.drawShape(new gL(r,n,i,a))},e.prototype.drawPolygon=function(){for(var r=arguments,n=[],i=0;i>16&255)/255*o,s.tint[1]=(a>>8&255)/255*o,s.tint[2]=(a&255)/255*o,s.tint[3]=o,r.shader.bind(n),r.geometry.bind(i,n),r.state.set(this.state);for(var l=0,c=u.length;l>16)+(l&65280)+((l&255)<<16)}}},e.prototype.calculateVertices=function(){var r=this.transform._worldID;if(this._transformID!==r){this._transformID=r;for(var n=this.transform.worldTransform,i=n.a,a=n.b,o=n.c,s=n.d,u=n.tx,l=n.ty,c=this._geometry.points,f=this.vertexData,h=0,d=0;d0||e&&a<=0)for(var f=i/2,o=f+f%2;o=6){nO(r,!1);for(var o=[],s=0;s=0&&s>=0&&i>=0&&a>=0)){e.length=0;return}var d=Math.ceil(2.3*Math.sqrt(o+s)),p=d*8+(i?4:0)+(a?4:0);if(e.length=p,p!==0){if(d===0){e.length=8,e[0]=e[6]=r+i,e[1]=e[3]=n+a,e[2]=e[4]=r-i,e[5]=e[7]=n-a;return}var v=0,g=d*4+(i?2:0)+2,m=g,y=p;{var _=i+o,x=a,b=r+_,S=r-_,w=n+x;if(e[v++]=b,e[v++]=w,e[--g]=w,e[--g]=S,a){var E=n-x;e[m++]=S,e[m++]=E,e[--y]=E,e[--y]=b}}for(var T=1;Tf&&(f+=Math.PI*2);var h=c,d=f-c,p=Math.abs(d),v=Math.sqrt(u*u+l*l),g=(15*p*Math.sqrt(v)/Math.PI>>0)+1,m=d/g;if(h+=m,s){o.push(t,e),o.push(r,n);for(var y=1,_=h;y=0&&(a.join===Gi.ROUND?p+=Bo(b,S,b-T*B,S-A*B,b-O*B,S-P*B,h,!1)+4:p+=2,h.push(b-O*j,S-P*j),h.push(b+O*B,S+P*B));continue}var H=(-T+_)*(-A+S)-(-T+b)*(-A+x),ee=(-O+w)*(-P+S)-(-O+b)*(-P+E),ie=(J*ee-$*H)/V,ae=(F*H-Z*ee)/V,pe=(ie-b)*(ie-b)+(ae-S)*(ae-S),ye=b+(ie-b)*B,oe=S+(ae-S)*B,_e=b-(ie-b)*j,Ce=S-(ae-S)*j,be=Math.min(J*J+Z*Z,$*$+F*F),Oe=U?B:j,ke=be+Oe*Oe*m,we=pe<=ke;we?a.join===Gi.BEVEL||pe/m>y?(U?(h.push(ye,oe),h.push(b+T*j,S+A*j),h.push(ye,oe),h.push(b+O*j,S+P*j)):(h.push(b-T*B,S-A*B),h.push(_e,Ce),h.push(b-O*B,S-P*B),h.push(_e,Ce)),p+=2):a.join===Gi.ROUND?U?(h.push(ye,oe),h.push(b+T*j,S+A*j),p+=Bo(b,S,b+T*j,S+A*j,b+O*j,S+P*j,h,!0)+4,h.push(ye,oe),h.push(b+O*j,S+P*j)):(h.push(b-T*B,S-A*B),h.push(_e,Ce),p+=Bo(b,S,b-T*B,S-A*B,b-O*B,S-P*B,h,!1)+4,h.push(b-O*B,S-P*B),h.push(_e,Ce)):(h.push(ye,oe),h.push(_e,Ce)):(h.push(b-T*B,S-A*B),h.push(b+T*j,S+A*j),a.join===Gi.ROUND?U?p+=Bo(b,S,b+T*j,S+A*j,b+O*j,S+P*j,h,!0)+2:p+=Bo(b,S,b-T*B,S-A*B,b-O*B,S-P*B,h,!1)+2:a.join===Gi.MITER&&pe/m<=y&&(U?(h.push(_e,Ce),h.push(_e,Ce)):(h.push(ye,oe),h.push(ye,oe)),p+=2),h.push(b-O*B,S-P*B),h.push(b+O*j,S+P*j),p+=2)}_=n[(d-2)*2],x=n[(d-2)*2+1],b=n[(d-1)*2],S=n[(d-1)*2+1],T=-(x-S),A=_-b,k=Math.sqrt(T*T+A*A),T/=k,A/=k,T*=g,A*=g,h.push(b-T*B,S-A*B),h.push(b+T*j,S+A*j),u||(a.cap===Ra.ROUND?p+=Bo(b-T*(B-j)*.5,S-A*(B-j)*.5,b-T*B,S-A*B,b+T*j,S+A*j,h,!1)+2:a.cap===Ra.SQUARE&&(p+=iO(b,S,T,A,B,j,!1,h)));for(var Xe=e.indices,tt=Xl.epsilon*Xl.epsilon,z=v;zh*l}},t.arc=function(e,r,n,i,a,o,s,u,l){for(var c=s-o,f=Xl._segmentsCount(Math.abs(c)*a,Math.ceil(Math.abs(c)/cf)*40),h=c/(f*2),d=h*2,p=Math.cos(h),v=Math.sin(h),g=f-1,m=g%1/g,y=0;y<=g;++y){var _=y+m*y,x=h+o+d*_,b=Math.cos(x),S=-Math.sin(x);l.push((p*b+v*S)*a+n,(p*-S+v*b)*a+i)}},t}(),xD=function(){function t(){}return t.curveLength=function(e,r,n,i,a,o,s,u){for(var l=10,c=0,f=0,h=0,d=0,p=0,v=0,g=0,m=0,y=0,_=0,x=0,b=e,S=r,w=1;w<=l;++w)f=w/l,h=f*f,d=h*f,p=1-f,v=p*p,g=v*p,m=g*e+3*v*f*n+3*p*h*a+d*s,y=g*r+3*v*f*i+3*p*h*o+d*u,_=b-m,x=S-y,b=m,S=y,c+=Math.sqrt(_*_+x*x);return c},t.curveTo=function(e,r,n,i,a,o,s){var u=s[s.length-2],l=s[s.length-1];s.length-=2;var c=Xl._segmentsCount(t.curveLength(u,l,e,r,n,i,a,o)),f=0,h=0,d=0,p=0,v=0;s.push(u,l);for(var g=1,m=0;g<=c;++g)m=g/c,f=1-m,h=f*f,d=h*f,p=m*m,v=p*m,s.push(d*u+3*h*m*e+3*f*p*n+v*a,d*l+3*h*m*r+3*f*p*i+v*o)},t}(),bD=function(){function t(){}return t.curveLength=function(e,r,n,i,a,o){var s=e-2*n+a,u=r-2*i+o,l=2*n-2*e,c=2*i-2*r,f=4*(s*s+u*u),h=4*(s*l+u*c),d=l*l+c*c,p=2*Math.sqrt(f+h+d),v=Math.sqrt(f),g=2*f*v,m=2*Math.sqrt(d),y=h/v;return(g*p+v*h*(p-m)+(4*d*f-h*h)*Math.log((2*v+y+p)/(y+m)))/(4*g)},t.curveTo=function(e,r,n,i,a){for(var o=a[a.length-2],s=a[a.length-1],u=Xl._segmentsCount(t.curveLength(o,s,e,r,n,i)),l=0,c=0,f=1;f<=u;++f){var h=f/u;l=o+(e-o)*h,c=s+(r-s)*h,a.push(l+(e+(n-e)*h-l)*h,c+(r+(i-r)*h-c)*h)}},t}(),SD=function(){function t(){this.reset()}return t.prototype.begin=function(e,r,n){this.reset(),this.style=e,this.start=r,this.attribStart=n},t.prototype.end=function(e,r){this.attribSize=r-this.attribStart,this.size=e-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),jo,Td=(jo={},jo[vr.POLY]=Pw,jo[vr.CIRC]=pf,jo[vr.ELIP]=pf,jo[vr.RECT]=yD,jo[vr.RREC]=_D,jo),ex=[],lc=[],tx=function(){function t(e,r,n,i){r===void 0&&(r=null),n===void 0&&(n=null),i===void 0&&(i=null),this.points=[],this.holes=[],this.shape=e,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=e.type}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),Ys=new We,wD=function(t){Cw(e,t);function e(){var r=t.call(this)||this;return r.closePointEps=1e-4,r.boundsPadding=0,r.uvsFloat32=null,r.indicesUint16=null,r.batchable=!1,r.points=[],r.colors=[],r.uvs=[],r.indices=[],r.textureIds=[],r.graphicsData=[],r.drawCalls=[],r.batchDirty=-1,r.batches=[],r.dirty=0,r.cacheDirty=-1,r.clearDirty=0,r.shapeIndex=0,r._bounds=new ff,r.boundsDirty=-1,r}return Object.defineProperty(e.prototype,"bounds",{get:function(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){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(var r=0;r0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(r,n,i,a){n===void 0&&(n=null),i===void 0&&(i=null),a===void 0&&(a=null);var o=new tx(r,n,i,a);return this.graphicsData.push(o),this.dirty++,this},e.prototype.drawHole=function(r,n){if(n===void 0&&(n=null),!this.graphicsData.length)return null;var i=new tx(r,null,null,n),a=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=a.lineStyle,a.holes.push(i),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var r=0;r0&&(i=this.batches[this.batches.length-1],a=i.style);for(var o=this.shapeIndex;o65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&_===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=_?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}},e.prototype._compareStyles=function(r,n){return!(!r||!n||r.texture.baseTexture!==n.texture.baseTexture||r.color+r.alpha!==n.color+n.alpha||!!r.native!=!!n.native)},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var r=0,n=this.graphicsData.length;r65535*2)return!1;for(var r=this.batches,n=0;n0&&(o=lc.pop(),o||(o=new bp,o.texArray=new Sp),this.drawCalls.push(o)),o.start=h,o.size=0,o.texArray.count=0,o.type=f),g.touched=1,g._batchEnabled=r,g._batchLocation=s,g.wrapMode=xi.REPEAT,o.texArray.elements[o.texArray.count++]=g,s++)),o.size+=d.size,h+=d.size,l=g._batchLocation,this.addColors(i,v.color,v.alpha,d.attribSize,d.attribStart),this.addTextureIds(a,l,d.attribSize,d.attribStart)}Je._globalBatch=r,this.packAttributes()},e.prototype.packAttributes=function(){for(var r=this.points,n=this.uvs,i=this.colors,a=this.textureIds,o=new ArrayBuffer(r.length*3*4),s=new Float32Array(o),u=new Uint32Array(o),l=0,c=0;c>16)+(n&65280)+((n&255)<<16),u=im(s,i);r.length=Math.max(r.length,o+a);for(var l=0;l0&&r.alpha>0;return n?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._lineStyle,{visible:n},r)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var r=this.currentPath.points,n=this.currentPath.points.length;n>2&&(this.drawShape(this.currentPath),this.currentPath=new Pl,this.currentPath.closeStroke=!1,this.currentPath.points.push(r[n-2],r[n-1]))}else this.currentPath=new Pl,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(r,n){return this.startPoly(),this.currentPath.points[0]=r,this.currentPath.points[1]=n,this},e.prototype.lineTo=function(r,n){this.currentPath||this.moveTo(0,0);var i=this.currentPath.points,a=i[i.length-2],o=i[i.length-1];return(a!==r||o!==n)&&i.push(r,n),this},e.prototype._initCurve=function(r,n){r===void 0&&(r=0),n===void 0&&(n=0),this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[r,n]):this.moveTo(r,n)},e.prototype.quadraticCurveTo=function(r,n,i,a){this._initCurve();var o=this.currentPath.points;return o.length===0&&this.moveTo(0,0),bD.curveTo(r,n,i,a,o),this},e.prototype.bezierCurveTo=function(r,n,i,a,o,s){return this._initCurve(),xD.curveTo(r,n,i,a,o,s,this.currentPath.points),this},e.prototype.arcTo=function(r,n,i,a,o){this._initCurve(r,n);var s=this.currentPath.points,u=J_.curveTo(r,n,i,a,o,s);if(u){var l=u.cx,c=u.cy,f=u.radius,h=u.startAngle,d=u.endAngle,p=u.anticlockwise;this.arc(l,c,f,h,d,p)}return this},e.prototype.arc=function(r,n,i,a,o,s){if(s===void 0&&(s=!1),a===o)return this;!s&&o<=a?o+=cf:s&&a<=o&&(a+=cf);var u=o-a;if(u===0)return this;var l=r+Math.cos(a)*i,c=n+Math.sin(a)*i,f=this._geometry.closePointEps,h=this.currentPath?this.currentPath.points:null;if(h){var d=Math.abs(h[h.length-2]-l),p=Math.abs(h[h.length-1]-c);d0;return n?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._fillStyle,{visible:n},r)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(r,n,i,a){return this.drawShape(new Ye(r,n,i,a))},e.prototype.drawRoundedRect=function(r,n,i,a,o){return this.drawShape(new _L(r,n,i,a,o))},e.prototype.drawCircle=function(r,n,i){return this.drawShape(new gL(r,n,i))},e.prototype.drawEllipse=function(r,n,i,a){return this.drawShape(new yL(r,n,i,a))},e.prototype.drawPolygon=function(){for(var r=arguments,n=[],i=0;i>16&255)/255*o,s.tint[1]=(a>>8&255)/255*o,s.tint[2]=(a&255)/255*o,s.tint[3]=o,r.shader.bind(n),r.geometry.bind(i,n),r.state.set(this.state);for(var l=0,c=u.length;l>16)+(l&65280)+((l&255)<<16)}}},e.prototype.calculateVertices=function(){var r=this.transform._worldID;if(this._transformID!==r){this._transformID=r;for(var n=this.transform.worldTransform,i=n.a,a=n.b,o=n.c,s=n.d,u=n.tx,l=n.ty,c=this._geometry.points,f=this.vertexData,h=0,d=0;d=a&&Yu.x=o&&Yu.y>16)+(r&65280)+((r&255)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(r){this._texture!==r&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=r||Me.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,r&&(r.baseTexture.valid?this._onTextureUpdate():r.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),e}(mr);/*! +***************************************************************************** */var rx=function(t,e){return rx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},rx(t,e)};function pme(t,e){rx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Yu=new We,vme=new Uint16Array([0,1,2,0,2,3]),_i=function(t){pme(e,t);function e(r){var n=t.call(this)||this;return n._anchor=new ro(n._onAnchorUpdate,n,r?r.defaultAnchor.x:0,r?r.defaultAnchor.y:0),n._texture=null,n._width=0,n._height=0,n._tint=null,n._tintRGB=null,n.tint=16777215,n.blendMode=Se.NORMAL,n._cachedTint=16777215,n.uvs=null,n.texture=r||Me.EMPTY,n.vertexData=new Float32Array(8),n.vertexTrimmedData=null,n._transformID=-1,n._textureID=-1,n._transformTrimmedID=-1,n._textureTrimmedID=-1,n.indices=vme,n.pluginName="batch",n.isSprite=!0,n._roundPixels=xe.ROUND_PIXELS,n}return e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=rs(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=rs(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){var r=this._texture;if(!(this._transformID===this.transform._worldID&&this._textureID===r._updateID)){this._textureID!==r._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=r._updateID;var n=this.transform.worldTransform,i=n.a,a=n.b,o=n.c,s=n.d,u=n.tx,l=n.ty,c=this.vertexData,f=r.trim,h=r.orig,d=this._anchor,p=0,v=0,g=0,m=0;if(f?(v=f.x-d._x*h.width,p=v+f.width,m=f.y-d._y*h.height,g=m+f.height):(v=-d._x*h.width,p=v+h.width,m=-d._y*h.height,g=m+h.height),c[0]=i*v+o*m+u,c[1]=s*m+a*v+l,c[2]=i*p+o*m+u,c[3]=s*m+a*p+l,c[4]=i*p+o*g+u,c[5]=s*g+a*p+l,c[6]=i*v+o*g+u,c[7]=s*g+a*v+l,this._roundPixels)for(var y=xe.RESOLUTION,_=0;_=a&&Yu.x=o&&Yu.y>16)+(r&65280)+((r&255)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(r){this._texture!==r&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=r||Me.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,r&&(r.baseTexture.valid?this._onTextureUpdate():r.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),e}(gr);/*! * @pixi/text - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -843,8 +843,8 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var rx=function(t,e){return rx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},rx(t,e)};function vme(t,e){rx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Wl;(function(t){t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"})(Wl||(Wl={}));var Ly={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Wl.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},mme=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],bs=function(){function t(e){this.styleID=0,this.reset(),By(this,e,e)}return t.prototype.clone=function(){var e={};return By(e,this,Ly),new t(e)},t.prototype.reset=function(){By(this,Ly,Ly)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(e){this._align!==e&&(this._align=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(e){var r=Dy(e);this._dropShadowColor!==r&&(this._dropShadowColor=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(e){var r=Dy(e);this._fill!==r&&(this._fill=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(e){gme(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},set:function(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontVariant",{get:function(){return this._fontVariant},set:function(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leading",{get:function(){return this._leading},set:function(e){this._leading!==e&&(this._leading=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this._padding},set:function(e){this._padding!==e&&(this._padding=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stroke",{get:function(){return this._stroke},set:function(e){var r=Dy(e);this._stroke!==r&&(this._stroke=r,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strokeThickness",{get:function(){return this._strokeThickness},set:function(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trim",{get:function(){return this._trim},set:function(e){this._trim!==e&&(this._trim=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"whiteSpace",{get:function(){return this._whiteSpace},set:function(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrapWidth",{get:function(){return this._wordWrapWidth},set:function(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)},enumerable:!1,configurable:!0}),t.prototype.toFontString=function(){var e=typeof this.fontSize=="number"?this.fontSize+"px":this.fontSize,r=this.fontFamily;Array.isArray(this.fontFamily)||(r=this.fontFamily.split(","));for(var n=r.length-1;n>=0;n--){var i=r[n].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&mme.indexOf(i)<0&&(i='"'+i+'"'),r[n]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+e+" "+r.join(",")},t}();function iO(t){return typeof t=="number"?XS(t):(typeof t=="string"&&t.indexOf("0x")===0&&(t=t.replace("0x","#")),t)}function Dy(t){if(Array.isArray(t)){for(var e=0;ep)if(o!==""&&(s+=t.addLine(o),o="",a=0),t.canBreakWords(m,r.breakWords))for(var b=t.wordWrapSplit(m),S=0;Sp&&(s+=t.addLine(o),d=!1,o="",a=0),o+=w,a+=O}else{o.length>0&&(s+=t.addLine(o),o="",a=0);var P=g===v.length-1;s+=t.addLine(m,!P),d=!1,o="",a=0}else x+a>p&&(d=!1,s+=t.addLine(o),o="",a=0),(o.length>0||!t.isBreakingSpace(m)||d)&&(o+=m,a+=x)}return s+=t.addLine(o,!1),s},t.addLine=function(e,r){return r===void 0&&(r=!0),e=t.trimRight(e),e=r?e+` -`:e,e},t.getFromCache=function(e,r,n,i){var a=n[e];if(typeof a!="number"){var o=e.length*r;a=i.measureText(e).width+o,n[e]=a}return a},t.collapseSpaces=function(e){return e==="normal"||e==="pre-line"},t.collapseNewlines=function(e){return e==="normal"},t.trimRight=function(e){if(typeof e!="string")return"";for(var r=e.length-1;r>=0;r--){var n=e[r];if(!t.isBreakingSpace(n))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return typeof e!="string"?!1:t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e,r){return typeof e!="string"?!1:t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],n="";if(typeof e!="string")return r;for(var i=0;is;--h){for(var v=0;v0&&g>m&&(y=(m+g)/2);var _=m+v,x=i.lineHeight*(p+1),b=_;p+1=0;n--){var i=r[n].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&gme.indexOf(i)<0&&(i='"'+i+'"'),r[n]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+e+" "+r.join(",")},t}();function aO(t){return typeof t=="number"?zS(t):(typeof t=="string"&&t.indexOf("0x")===0&&(t=t.replace("0x","#")),t)}function Dy(t){if(Array.isArray(t)){for(var e=0;ep)if(o!==""&&(s+=t.addLine(o),o="",a=0),t.canBreakWords(m,r.breakWords))for(var b=t.wordWrapSplit(m),S=0;Sp&&(s+=t.addLine(o),d=!1,o="",a=0),o+=w,a+=O}else{o.length>0&&(s+=t.addLine(o),o="",a=0);var P=g===v.length-1;s+=t.addLine(m,!P),d=!1,o="",a=0}else x+a>p&&(d=!1,s+=t.addLine(o),o="",a=0),(o.length>0||!t.isBreakingSpace(m)||d)&&(o+=m,a+=x)}return s+=t.addLine(o,!1),s},t.addLine=function(e,r){return r===void 0&&(r=!0),e=t.trimRight(e),e=r?e+` +`:e,e},t.getFromCache=function(e,r,n,i){var a=n[e];if(typeof a!="number"){var o=e.length*r;a=i.measureText(e).width+o,n[e]=a}return a},t.collapseSpaces=function(e){return e==="normal"||e==="pre-line"},t.collapseNewlines=function(e){return e==="normal"},t.trimRight=function(e){if(typeof e!="string")return"";for(var r=e.length-1;r>=0;r--){var n=e[r];if(!t.isBreakingSpace(n))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return typeof e!="string"?!1:t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e,r){return typeof e!="string"?!1:t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],n="";if(typeof e!="string")return r;for(var i=0;is;--h){for(var v=0;v0&&g>m&&(y=(m+g)/2);var _=m+v,x=i.lineHeight*(p+1),b=_;p+10},t}();function xme(t,e){var r=!1;if(t&&t._textures&&t._textures.length){for(var n=0;n=0;r--)this.add(e.children[r]);return this},t.prototype.destroy=function(){this.ticking&&Or.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();function AD(t,e){return e instanceof Je?(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0):!1}function Cme(t,e){if(!(e instanceof zl))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var n=r.batches,i=0;i0},t}();function bme(t,e){var r=!1;if(t&&t._textures&&t._textures.length){for(var n=0;n=0;r--)this.add(e.children[r]);return this},t.prototype.destroy=function(){this.ticking&&Or.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();function CD(t,e){return e instanceof Je?(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0):!1}function Pme(t,e){if(!(e instanceof zl))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var n=r.batches,i=0;i=a&&Hu.x=o&&Hu.y=a&&Hu.x=o&&Hu.y1?Ma.from(Mme,Fme,n):Ma.from(aO,kme,n)},e.prototype.render=function(r){var n=this.renderer,i=this.quad,a=i.vertices;a[0]=a[6]=r._width*-r.anchor.x,a[1]=a[3]=r._height*-r.anchor.y,a[2]=a[4]=r._width*(1-r.anchor.x),a[5]=a[7]=r._height*(1-r.anchor.y);var o=r.uvRespectAnchor?r.anchor.x:0,s=r.uvRespectAnchor?r.anchor.y:0;a=i.uvs,a[0]=a[6]=-o,a[1]=a[3]=-s,a[2]=a[4]=1-o,a[5]=a[7]=1-s,i.invalidate();var u=r._texture,l=u.baseTexture,c=l.alphaMode>0,f=r.tileTransform.localTransform,h=r.uvMatrix,d=l.isPowerOfTwo&&u.frame.width===l.width&&u.frame.height===l.height;d&&(l._glTextures[n.CONTEXT_UID]?d=l.wrapMode!==xi.CLAMP:l.wrapMode===xi.CLAMP&&(l.wrapMode=xi.REPEAT));var p=d?this.simpleShader:this.shader,v=u.width,g=u.height,m=r._width,y=r._height;zh.set(f.a*v/m,f.b*v/y,f.c*g/m,f.d*g/y,f.tx/m,f.ty/y),zh.invert(),d?zh.prepend(h.mapCoord):(p.uniforms.uMapCoord=h.mapCoord.toArray(!0),p.uniforms.uClampFrame=h.uClampFrame,p.uniforms.uClampOffset=h.uClampOffset),p.uniforms.uTransform=zh.toArray(!0),p.uniforms.uColor=HS(r.tint,r.worldAlpha,p.uniforms.uColor,c),p.uniforms.translationMatrix=r.transform.worldTransform.toArray(!0),p.uniforms.uSampler=u,n.shader.bind(p),n.geometry.bind(i),this.state.blendMode=YS(r.blendMode,c),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e.extension={name:"tilingSprite",type:dt.RendererPlugin},e}(qf);/*! +`,zh=new Ut,kD=function(t){ID(e,t);function e(r){var n=t.call(this,r)||this;return r.runners.contextChange.add(n),n.quad=new ow,n.state=Mo.for2d(),n}return e.prototype.contextChange=function(){var r=this.renderer,n={globals:r.globalUniforms};this.simpleShader=Ma.from(oO,kme,n),this.shader=r.context.webGLVersion>1?Ma.from(Fme,Nme,n):Ma.from(oO,Mme,n)},e.prototype.render=function(r){var n=this.renderer,i=this.quad,a=i.vertices;a[0]=a[6]=r._width*-r.anchor.x,a[1]=a[3]=r._height*-r.anchor.y,a[2]=a[4]=r._width*(1-r.anchor.x),a[5]=a[7]=r._height*(1-r.anchor.y);var o=r.uvRespectAnchor?r.anchor.x:0,s=r.uvRespectAnchor?r.anchor.y:0;a=i.uvs,a[0]=a[6]=-o,a[1]=a[3]=-s,a[2]=a[4]=1-o,a[5]=a[7]=1-s,i.invalidate();var u=r._texture,l=u.baseTexture,c=l.alphaMode>0,f=r.tileTransform.localTransform,h=r.uvMatrix,d=l.isPowerOfTwo&&u.frame.width===l.width&&u.frame.height===l.height;d&&(l._glTextures[n.CONTEXT_UID]?d=l.wrapMode!==xi.CLAMP:l.wrapMode===xi.CLAMP&&(l.wrapMode=xi.REPEAT));var p=d?this.simpleShader:this.shader,v=u.width,g=u.height,m=r._width,y=r._height;zh.set(f.a*v/m,f.b*v/y,f.c*g/m,f.d*g/y,f.tx/m,f.ty/y),zh.invert(),d?zh.prepend(h.mapCoord):(p.uniforms.uMapCoord=h.mapCoord.toArray(!0),p.uniforms.uClampFrame=h.uClampFrame,p.uniforms.uClampOffset=h.uClampOffset),p.uniforms.uTransform=zh.toArray(!0),p.uniforms.uColor=qS(r.tint,r.worldAlpha,p.uniforms.uColor,c),p.uniforms.translationMatrix=r.transform.worldTransform.toArray(!0),p.uniforms.uSampler=u,n.shader.bind(p),n.geometry.bind(i),this.state.blendMode=HS(r.blendMode,c),n.state.set(this.state),n.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e.extension={name:"tilingSprite",type:dt.RendererPlugin},e}(qf);/*! * @pixi/mesh - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -1021,7 +1021,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var ax=function(t,e){return ax=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},ax(t,e)};function Ow(t,e){ax(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var kD=function(){function t(e,r){this.uvBuffer=e,this.uvMatrix=r,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}return t.prototype.update=function(e){if(!(!e&&this._bufferUpdateId===this.uvBuffer._updateID&&this._textureUpdateId===this.uvMatrix._updateID)){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var r=this.uvBuffer.data;(!this.data||this.data.length!==r.length)&&(this.data=new Float32Array(r.length)),this.uvMatrix.multiplyUvs(r,this.data),this._updateID++}},t}(),jy=new We,oO=new Pl,Yl=function(t){Ow(e,t);function e(r,n,i,a){a===void 0&&(a=Ln.TRIANGLES);var o=t.call(this)||this;return o.geometry=r,o.shader=n,o.state=i||Mo.for2d(),o.drawMode=a,o.start=0,o.size=0,o.uvs=null,o.indices=null,o.vertexData=new Float32Array(1),o.vertexDirty=-1,o._transformID=-1,o._roundPixels=xe.ROUND_PIXELS,o.batchUvs=null,o}return Object.defineProperty(e.prototype,"geometry",{get:function(){return this._geometry},set:function(r){this._geometry!==r&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=r,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uvBuffer",{get:function(){return this.geometry.buffers[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticesBuffer",{get:function(){return this.geometry.buffers[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"material",{get:function(){return this.shader},set:function(r){this.shader=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(r){this.state.blendMode=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(r){this._roundPixels!==r&&(this._transformID=-1),this._roundPixels=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return"tint"in this.shader?this.shader.tint:null},set:function(r){this.shader.tint=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return"texture"in this.shader?this.shader.texture:null},set:function(r){this.shader.texture=r},enumerable:!1,configurable:!0}),e.prototype._render=function(r){var n=this.geometry.buffers[0].data,i=this.shader;i.batchable&&this.drawMode===Ln.TRIANGLES&&n.length>16)+(r&65280)+((r&255)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var r=this.texture.baseTexture;HS(this._tint,this._alpha,this.uniforms.uColor,r.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Ma),Kf=function(t){Ow(e,t);function e(r,n,i){var a=t.call(this)||this,o=new ir(r),s=new ir(n,!0),u=new ir(i,!0,!0);return a.addAttribute("aVertexPosition",o,2,!1,Re.FLOAT).addAttribute("aTextureCoord",s,2,!1,Re.FLOAT).addIndex(u),a._updateId=-1,a}return Object.defineProperty(e.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),e}(_u);/*! +`,Hl=function(t){Rw(e,t);function e(r,n){var i=this,a={uSampler:r,alpha:1,uTextureMatrix:Ut.IDENTITY,uColor:new Float32Array([1,1,1,1])};return n=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},n),n.uniforms&&Object.assign(a,n.uniforms),i=t.call(this,n.program||xu.from(Dme,Lme),a)||this,i._colorDirty=!1,i.uvMatrix=new cm(r),i.batchable=n.program===void 0,i.pluginName=n.pluginName,i.tint=n.tint,i.alpha=n.alpha,i}return Object.defineProperty(e.prototype,"texture",{get:function(){return this.uniforms.uSampler},set:function(r){this.uniforms.uSampler!==r&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!r.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=r,this.uvMatrix.texture=r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(r){r!==this._alpha&&(this._alpha=r,this._colorDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(r){r!==this._tint&&(this._tint=r,this._tintRGB=(r>>16)+(r&65280)+((r&255)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var r=this.texture.baseTexture;qS(this._tint,this._alpha,this.uniforms.uColor,r.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Ma),Kf=function(t){Rw(e,t);function e(r,n,i){var a=t.call(this)||this,o=new ir(r),s=new ir(n,!0),u=new ir(i,!0,!0);return a.addAttribute("aVertexPosition",o,2,!1,Re.FLOAT).addAttribute("aTextureCoord",s,2,!1,Re.FLOAT).addIndex(u),a._updateId=-1,a}return Object.defineProperty(e.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),e}(_u);/*! * @pixi/text-bitmap - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -1064,7 +1064,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var ox=function(t,e){return ox=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},ox(t,e)};function Dme(t,e){ox(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var vf=function(){function t(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}return t}(),MD=function(){function t(){}return t.test=function(e){return typeof e=="string"&&e.indexOf("info face=")===0},t.parse=function(e){var r=e.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(var i in r){var a=r[i].match(/^[a-z]+/gm)[0],o=r[i].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),s={};for(var u in o){var l=o[u].split("="),c=l[0],f=l[1].replace(/"/gm,""),h=parseFloat(f),d=isNaN(h)?f:h;s[c]=d}n[a].push(s)}var p=new vf;return n.info.forEach(function(v){return p.info.push({face:v.face,size:parseInt(v.size,10)})}),n.common.forEach(function(v){return p.common.push({lineHeight:parseInt(v.lineHeight,10)})}),n.page.forEach(function(v){return p.page.push({id:parseInt(v.id,10),file:v.file})}),n.char.forEach(function(v){return p.char.push({id:parseInt(v.id,10),page:parseInt(v.page,10),x:parseInt(v.x,10),y:parseInt(v.y,10),width:parseInt(v.width,10),height:parseInt(v.height,10),xoffset:parseInt(v.xoffset,10),yoffset:parseInt(v.yoffset,10),xadvance:parseInt(v.xadvance,10)})}),n.kerning.forEach(function(v){return p.kerning.push({first:parseInt(v.first,10),second:parseInt(v.second,10),amount:parseInt(v.amount,10)})}),n.distanceField.forEach(function(v){return p.distanceField.push({distanceRange:parseInt(v.distanceRange,10),fieldType:v.fieldType})}),p},t}(),Tp=function(){function t(){}return t.test=function(e){return e instanceof XMLDocument&&e.getElementsByTagName("page").length&&e.getElementsByTagName("info")[0].getAttribute("face")!==null},t.parse=function(e){for(var r=new vf,n=e.getElementsByTagName("info"),i=e.getElementsByTagName("common"),a=e.getElementsByTagName("page"),o=e.getElementsByTagName("char"),s=e.getElementsByTagName("kerning"),u=e.getElementsByTagName("distanceField"),l=0;l")>-1){var r=new globalThis.DOMParser().parseFromString(e,"text/xml");return Tp.test(r)}return!1},t.parse=function(e){var r=new globalThis.DOMParser().parseFromString(e,"text/xml");return Tp.parse(r)},t}(),Uy=[MD,Tp,FD];function Rw(t){for(var e=0;e=l-T*s){if(v===0)throw new Error("[BitmapFont] textureHeight "+l+"px is too small "+("(fontFamily: '"+f.fontFamily+"', fontSize: "+f.fontSize+"px, char: '"+S+"')"));--b,g=null,m=null,y=null,v=0,p=0,_=0;continue}if(_=Math.max(T+w.fontProperties.descent,_),A*s+p>=h){if(p===0)throw new Error("[BitmapFont] textureWidth "+u+"px is too small "+("(fontFamily: '"+f.fontFamily+"', fontSize: "+f.fontSize+"px, char: '"+S+"')"));--b,v+=_*s,v=Math.ceil(v),p=0,_=0;continue}jme(g,m,w,p,v,s,f);var O=Ad(w.text);d.char.push({id:O,page:x.length-1,x:p/s,y:v/s,width:A,height:T,xoffset:0,yoffset:0,xadvance:Math.ceil(E-(f.dropShadow?f.dropShadowDistance:0)-(f.stroke?f.strokeThickness:0))}),p+=(A+2*o)*s,p=Math.ceil(p)}if(!(n!=null&&n.skipKerning))for(var b=0,P=c.length;b")>-1){var r=new globalThis.DOMParser().parseFromString(e,"text/xml");return Tp.test(r)}return!1},t.parse=function(e){var r=new globalThis.DOMParser().parseFromString(e,"text/xml");return Tp.parse(r)},t}(),Uy=[FD,Tp,ND];function Iw(t){for(var e=0;e=l-T*s){if(v===0)throw new Error("[BitmapFont] textureHeight "+l+"px is too small "+("(fontFamily: '"+f.fontFamily+"', fontSize: "+f.fontSize+"px, char: '"+S+"')"));--b,g=null,m=null,y=null,v=0,p=0,_=0;continue}if(_=Math.max(T+w.fontProperties.descent,_),A*s+p>=h){if(p===0)throw new Error("[BitmapFont] textureWidth "+u+"px is too small "+("(fontFamily: '"+f.fontFamily+"', fontSize: "+f.fontSize+"px, char: '"+S+"')"));--b,v+=_*s,v=Math.ceil(v),p=0,_=0;continue}Ume(g,m,w,p,v,s,f);var O=Ad(w.text);d.char.push({id:O,page:x.length-1,x:p/s,y:v/s,width:A,height:T,xoffset:0,yoffset:0,xadvance:Math.ceil(E-(f.dropShadow?f.dropShadowDistance:0)-(f.stroke?f.strokeThickness:0))}),p+=(A+2*o)*s,p=Math.ceil(p)}if(!(n!=null&&n.skipKerning))for(var b=0,P=c.length;b0&&o.x>h&&(++x,cs(s,1+y-x,1+w-y),w=y,y=-1,u.push(_),l.push(s.length>0?s[s.length-1].prevSpaces:0),g=Math.max(g,_),m++,o.x=0,o.y+=n.lineHeight,p=null,S=0)}}var P=f[f.length-1];P!=="\r"&&P!==` -`&&(/(?:\s)/.test(P)&&(v=_),u.push(v),g=Math.max(g,v),l.push(-1));for(var k=[],w=0;w<=m;w++){var M=0;this._align==="right"?M=g-u[w]:this._align==="center"?M=(g-u[w])/2:this._align==="justify"&&(M=l[w]<0?0:(g-u[w])/l[w]),k.push(M)}var B=s.length,j={},z=[],J=this._activePagesMeshData;d.push.apply(d,J);for(var w=0;w6*ie)||F.vertices.length0&&o.x>h&&(++x,cs(s,1+y-x,1+w-y),w=y,y=-1,u.push(_),l.push(s.length>0?s[s.length-1].prevSpaces:0),g=Math.max(g,_),m++,o.x=0,o.y+=n.lineHeight,p=null,S=0)}}var P=f[f.length-1];P!=="\r"&&P!==` +`&&(/(?:\s)/.test(P)&&(v=_),u.push(v),g=Math.max(g,v),l.push(-1));for(var k=[],w=0;w<=m;w++){var M=0;this._align==="right"?M=g-u[w]:this._align==="center"?M=(g-u[w])/2:this._align==="justify"&&(M=l[w]<0?0:(g-u[w])/l[w]),k.push(M)}var B=s.length,j={},z=[],J=this._activePagesMeshData;d.push.apply(d,J);for(var w=0;w6*ie)||F.vertices.length=r&&(o=t-s-1),u=u.replace("%value%",e[o].toString()),i+=u,i+=` -`}return n=n.replace("%blur%",i),n=n.replace("%size%",t.toString()),n}var mf=function(t){BD(e,t);function e(r,n,i,a,o){n===void 0&&(n=8),i===void 0&&(i=4),a===void 0&&(a=xe.FILTER_RESOLUTION),o===void 0&&(o=5);var s=this,u=Yme(o,r),l=Kme(o);return s=t.call(this,u,l)||this,s.horizontal=r,s.resolution=a,s._quality=0,s.quality=i,s.blur=n,s}return e.prototype.apply=function(r,n,i,a){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/n.width):this.uniforms.strength=1/i.height*(i.height/n.height):this.horizontal?this.uniforms.strength=1/r.renderer.width*(r.renderer.width/n.width):this.uniforms.strength=1/r.renderer.height*(r.renderer.height/n.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)r.applyFilter(this,n,i,a);else{var o=r.getFilterTexture(),s=r.renderer,u=n,l=o;this.state.blend=!1,r.applyFilter(this,u,l,qn.CLEAR);for(var c=1;c=r&&(o=t-s-1),u=u.replace("%value%",e[o].toString()),i+=u,i+=` +`}return n=n.replace("%blur%",i),n=n.replace("%size%",t.toString()),n}var mf=function(t){jD(e,t);function e(r,n,i,a,o){n===void 0&&(n=8),i===void 0&&(i=4),a===void 0&&(a=xe.FILTER_RESOLUTION),o===void 0&&(o=5);var s=this,u=Hme(o,r),l=Zme(o);return s=t.call(this,u,l)||this,s.horizontal=r,s.resolution=a,s._quality=0,s.quality=i,s.blur=n,s}return e.prototype.apply=function(r,n,i,a){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/n.width):this.uniforms.strength=1/i.height*(i.height/n.height):this.horizontal?this.uniforms.strength=1/r.renderer.width*(r.renderer.width/n.width):this.uniforms.strength=1/r.renderer.height*(r.renderer.height/n.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)r.applyFilter(this,n,i,a);else{var o=r.getFilterTexture(),s=r.renderer,u=n,l=o;this.state.blend=!1,r.applyFilter(this,u,l,qn.CLEAR);for(var c=1;c>16&255,a=r>>8&255,o=r&255,s=[i/255,0,0,0,0,0,a/255,0,0,0,0,0,o/255,0,0,0,0,0,1,0];this._loadMatrix(s,n)},e.prototype.greyscale=function(r,n){var i=[r,r,r,0,0,r,r,r,0,0,r,r,r,0,0,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.blackAndWhite=function(r){var n=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.hue=function(r,n){r=(r||0)/180*Math.PI;var i=Math.cos(r),a=Math.sin(r),o=Math.sqrt,s=1/3,u=o(s),l=i+(1-i)*s,c=s*(1-i)-u*a,f=s*(1-i)+u*a,h=s*(1-i)+u*a,d=i+s*(1-i),p=s*(1-i)-u*a,v=s*(1-i)-u*a,g=s*(1-i)+u*a,m=i+s*(1-i),y=[l,c,f,0,0,h,d,p,0,0,v,g,m,0,0,0,0,0,1,0];this._loadMatrix(y,n)},e.prototype.contrast=function(r,n){var i=(r||0)+1,a=-.5*(i-1),o=[i,0,0,0,a,0,i,0,0,a,0,0,i,0,a,0,0,0,1,0];this._loadMatrix(o,n)},e.prototype.saturate=function(r,n){r===void 0&&(r=0);var i=r*2/3+1,a=(i-1)*-.5,o=[i,a,a,0,0,a,i,a,0,0,a,a,i,0,0,0,0,0,1,0];this._loadMatrix(o,n)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(r){var n=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.sepia=function(r){var n=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.technicolor=function(r){var n=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.polaroid=function(r){var n=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.toBGR=function(r){var n=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.kodachrome=function(r){var n=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.browni=function(r){var n=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.vintage=function(r){var n=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.colorTone=function(r,n,i,a,o){r=r||.2,n=n||.15,i=i||16770432,a=a||3375104;var s=(i>>16&255)/255,u=(i>>8&255)/255,l=(i&255)/255,c=(a>>16&255)/255,f=(a>>8&255)/255,h=(a&255)/255,d=[.3,.59,.11,0,0,s,u,l,r,0,c,f,h,n,0,s-c,u-f,l-h,0,0];this._loadMatrix(d,o)},e.prototype.night=function(r,n){r=r||.1;var i=[r*-2,-r,0,0,0,-r,0,r,0,0,0,r,r*2,0,0,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.predator=function(r,n){var i=[11.224130630493164*r,-4.794486999511719*r,-2.8746118545532227*r,0*r,.40342438220977783*r,-3.6330697536468506*r,9.193157196044922*r,-2.951810836791992*r,0*r,-1.316135048866272*r,-3.2184197902679443*r,-4.2375030517578125*r,7.476448059082031*r,0*r,.8044459223747253*r,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.lsd=function(r){var n=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.reset=function(){var r=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(r,!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(r){this.uniforms.m=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(r){this.uniforms.uAlpha=r},enumerable:!1,configurable:!0}),e}(De);cx.prototype.grayscale=cx.prototype.greyscale;/*! +`,fx=function(t){Jme(e,t);function e(){var r=this,n={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};return r=t.call(this,Sw,ege,n)||this,r.alpha=1,r}return e.prototype._loadMatrix=function(r,n){n===void 0&&(n=!1);var i=r;n&&(this._multiply(i,this.uniforms.m,r),i=this._colorMatrix(i)),this.uniforms.m=i},e.prototype._multiply=function(r,n,i){return r[0]=n[0]*i[0]+n[1]*i[5]+n[2]*i[10]+n[3]*i[15],r[1]=n[0]*i[1]+n[1]*i[6]+n[2]*i[11]+n[3]*i[16],r[2]=n[0]*i[2]+n[1]*i[7]+n[2]*i[12]+n[3]*i[17],r[3]=n[0]*i[3]+n[1]*i[8]+n[2]*i[13]+n[3]*i[18],r[4]=n[0]*i[4]+n[1]*i[9]+n[2]*i[14]+n[3]*i[19]+n[4],r[5]=n[5]*i[0]+n[6]*i[5]+n[7]*i[10]+n[8]*i[15],r[6]=n[5]*i[1]+n[6]*i[6]+n[7]*i[11]+n[8]*i[16],r[7]=n[5]*i[2]+n[6]*i[7]+n[7]*i[12]+n[8]*i[17],r[8]=n[5]*i[3]+n[6]*i[8]+n[7]*i[13]+n[8]*i[18],r[9]=n[5]*i[4]+n[6]*i[9]+n[7]*i[14]+n[8]*i[19]+n[9],r[10]=n[10]*i[0]+n[11]*i[5]+n[12]*i[10]+n[13]*i[15],r[11]=n[10]*i[1]+n[11]*i[6]+n[12]*i[11]+n[13]*i[16],r[12]=n[10]*i[2]+n[11]*i[7]+n[12]*i[12]+n[13]*i[17],r[13]=n[10]*i[3]+n[11]*i[8]+n[12]*i[13]+n[13]*i[18],r[14]=n[10]*i[4]+n[11]*i[9]+n[12]*i[14]+n[13]*i[19]+n[14],r[15]=n[15]*i[0]+n[16]*i[5]+n[17]*i[10]+n[18]*i[15],r[16]=n[15]*i[1]+n[16]*i[6]+n[17]*i[11]+n[18]*i[16],r[17]=n[15]*i[2]+n[16]*i[7]+n[17]*i[12]+n[18]*i[17],r[18]=n[15]*i[3]+n[16]*i[8]+n[17]*i[13]+n[18]*i[18],r[19]=n[15]*i[4]+n[16]*i[9]+n[17]*i[14]+n[18]*i[19]+n[19],r},e.prototype._colorMatrix=function(r){var n=new Float32Array(r);return n[4]/=255,n[9]/=255,n[14]/=255,n[19]/=255,n},e.prototype.brightness=function(r,n){var i=[r,0,0,0,0,0,r,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.tint=function(r,n){var i=r>>16&255,a=r>>8&255,o=r&255,s=[i/255,0,0,0,0,0,a/255,0,0,0,0,0,o/255,0,0,0,0,0,1,0];this._loadMatrix(s,n)},e.prototype.greyscale=function(r,n){var i=[r,r,r,0,0,r,r,r,0,0,r,r,r,0,0,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.blackAndWhite=function(r){var n=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.hue=function(r,n){r=(r||0)/180*Math.PI;var i=Math.cos(r),a=Math.sin(r),o=Math.sqrt,s=1/3,u=o(s),l=i+(1-i)*s,c=s*(1-i)-u*a,f=s*(1-i)+u*a,h=s*(1-i)+u*a,d=i+s*(1-i),p=s*(1-i)-u*a,v=s*(1-i)-u*a,g=s*(1-i)+u*a,m=i+s*(1-i),y=[l,c,f,0,0,h,d,p,0,0,v,g,m,0,0,0,0,0,1,0];this._loadMatrix(y,n)},e.prototype.contrast=function(r,n){var i=(r||0)+1,a=-.5*(i-1),o=[i,0,0,0,a,0,i,0,0,a,0,0,i,0,a,0,0,0,1,0];this._loadMatrix(o,n)},e.prototype.saturate=function(r,n){r===void 0&&(r=0);var i=r*2/3+1,a=(i-1)*-.5,o=[i,a,a,0,0,a,i,a,0,0,a,a,i,0,0,0,0,0,1,0];this._loadMatrix(o,n)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(r){var n=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.sepia=function(r){var n=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.technicolor=function(r){var n=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.polaroid=function(r){var n=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.toBGR=function(r){var n=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.kodachrome=function(r){var n=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.browni=function(r){var n=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.vintage=function(r){var n=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.colorTone=function(r,n,i,a,o){r=r||.2,n=n||.15,i=i||16770432,a=a||3375104;var s=(i>>16&255)/255,u=(i>>8&255)/255,l=(i&255)/255,c=(a>>16&255)/255,f=(a>>8&255)/255,h=(a&255)/255,d=[.3,.59,.11,0,0,s,u,l,r,0,c,f,h,n,0,s-c,u-f,l-h,0,0];this._loadMatrix(d,o)},e.prototype.night=function(r,n){r=r||.1;var i=[r*-2,-r,0,0,0,-r,0,r,0,0,0,r,r*2,0,0,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.predator=function(r,n){var i=[11.224130630493164*r,-4.794486999511719*r,-2.8746118545532227*r,0*r,.40342438220977783*r,-3.6330697536468506*r,9.193157196044922*r,-2.951810836791992*r,0*r,-1.316135048866272*r,-3.2184197902679443*r,-4.2375030517578125*r,7.476448059082031*r,0*r,.8044459223747253*r,0,0,0,1,0];this._loadMatrix(i,n)},e.prototype.lsd=function(r){var n=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(n,r)},e.prototype.reset=function(){var r=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(r,!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(r){this.uniforms.m=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(r){this.uniforms.uAlpha=r},enumerable:!1,configurable:!0}),e}(De);fx.prototype.grayscale=fx.prototype.greyscale;/*! * @pixi/filter-displacement - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -1287,7 +1287,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var fx=function(t,e){return fx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},fx(t,e)};function ege(t,e){fx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var tge=`varying vec2 vFilterCoord; +***************************************************************************** */var hx=function(t,e){return hx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},hx(t,e)};function tge(t,e){hx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var rge=`varying vec2 vFilterCoord; varying vec2 vTextureCoord; uniform vec2 scale; @@ -1307,7 +1307,7 @@ void main(void) gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw)); } -`,rge=`attribute vec2 aVertexPosition; +`,nge=`attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; uniform mat3 filterMatrix; @@ -1336,7 +1336,7 @@ void main(void) vTextureCoord = filterTextureCoord(); vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy; } -`,nge=function(t){ege(e,t);function e(r,n){var i=this,a=new Ut;return r.renderable=!1,i=t.call(this,rge,tge,{mapSampler:r._texture,filterMatrix:a,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this,i.maskSprite=r,i.maskMatrix=a,n==null&&(n=20),i.scale=new We(n,n),i}return e.prototype.apply=function(r,n,i,a){this.uniforms.filterMatrix=r.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var o=this.maskSprite.worldTransform,s=Math.sqrt(o.a*o.a+o.b*o.b),u=Math.sqrt(o.c*o.c+o.d*o.d);s!==0&&u!==0&&(this.uniforms.rotation[0]=o.a/s,this.uniforms.rotation[1]=o.b/s,this.uniforms.rotation[2]=o.c/u,this.uniforms.rotation[3]=o.d/u),r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(r){this.uniforms.mapSampler=r},enumerable:!1,configurable:!0}),e}(De);/*! +`,ige=function(t){tge(e,t);function e(r,n){var i=this,a=new Ut;return r.renderable=!1,i=t.call(this,nge,rge,{mapSampler:r._texture,filterMatrix:a,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this,i.maskSprite=r,i.maskMatrix=a,n==null&&(n=20),i.scale=new We(n,n),i}return e.prototype.apply=function(r,n,i,a){this.uniforms.filterMatrix=r.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var o=this.maskSprite.worldTransform,s=Math.sqrt(o.a*o.a+o.b*o.b),u=Math.sqrt(o.c*o.c+o.d*o.d);s!==0&&u!==0&&(this.uniforms.rotation[0]=o.a/s,this.uniforms.rotation[1]=o.b/s,this.uniforms.rotation[2]=o.c/u,this.uniforms.rotation[3]=o.d/u),r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(r){this.uniforms.mapSampler=r},enumerable:!1,configurable:!0}),e}(De);/*! * @pixi/filter-fxaa - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -1355,7 +1355,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var hx=function(t,e){return hx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},hx(t,e)};function ige(t,e){hx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var age=` +***************************************************************************** */var dx=function(t,e){return dx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},dx(t,e)};function age(t,e){dx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var oge=` attribute vec2 aVertexPosition; uniform mat3 projectionMatrix; @@ -1397,7 +1397,7 @@ void main(void) { texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM); } -`,oge=`varying vec2 v_rgbNW; +`,sge=`varying vec2 v_rgbNW; varying vec2 v_rgbNE; varying vec2 v_rgbSW; varying vec2 v_rgbSE; @@ -1518,7 +1518,7 @@ void main() { gl_FragColor = color; } -`,sge=function(t){ige(e,t);function e(){return t.call(this,age,oge)||this}return e}(De);/*! +`,lge=function(t){age(e,t);function e(){return t.call(this,oge,sge)||this}return e}(De);/*! * @pixi/filter-noise - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -1537,7 +1537,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var dx=function(t,e){return dx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},dx(t,e)};function lge(t,e){dx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var uge=`precision highp float; +***************************************************************************** */var px=function(t,e){return px=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},px(t,e)};function uge(t,e){px(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var cge=`precision highp float; varying vec2 vTextureCoord; varying vec4 vColor; @@ -1571,31 +1571,31 @@ void main() gl_FragColor = color; } -`,cge=function(t){lge(e,t);function e(r,n){r===void 0&&(r=.5),n===void 0&&(n=Math.random());var i=t.call(this,bw,uge,{uNoise:0,uSeed:0})||this;return i.noise=r,i.seed=n,i}return Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(r){this.uniforms.uNoise=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(r){this.uniforms.uSeed=r},enumerable:!1,configurable:!0}),e}(De);/*! +`,fge=function(t){uge(e,t);function e(r,n){r===void 0&&(r=.5),n===void 0&&(n=Math.random());var i=t.call(this,Sw,cge,{uNoise:0,uSeed:0})||this;return i.noise=r,i.seed=n,i}return Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(r){this.uniforms.uNoise=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(r){this.uniforms.uSeed=r},enumerable:!1,configurable:!0}),e}(De);/*! * @pixi/mixin-cache-as-bitmap - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/mixin-cache-as-bitmap is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */var jD=new Ut;Wt.prototype._cacheAsBitmap=!1;Wt.prototype._cacheData=null;Wt.prototype._cacheAsBitmapResolution=null;Wt.prototype._cacheAsBitmapMultisample=Ot.NONE;var fge=function(){function t(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}return t}();Object.defineProperties(Wt.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e;t?(this._cacheData||(this._cacheData=new fge),e=this._cacheData,e.originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}});Wt.prototype._renderCached=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(e),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(e))};Wt.prototype._initCachedDisplayObject=function(e){var r;if(!(this._cacheData&&this._cacheData.sprite)){var n=this.alpha;this.alpha=1,e.batch.flush();var i=this.getLocalBounds(null,!0).clone();if(this.filters&&this.filters.length){var a=this.filters[0].padding;i.pad(a)}i.ceil(xe.RESOLUTION);var o=e.renderTexture.current,s=e.renderTexture.sourceFrame.clone(),u=e.renderTexture.destinationFrame.clone(),l=e.projection.transform,c=Co.create({width:i.width,height:i.height,resolution:this.cacheAsBitmapResolution||e.resolution,multisample:(r=this.cacheAsBitmapMultisample)!==null&&r!==void 0?r:e.multisample}),f="cacheAsBitmap_"+To();this._cacheData.textureCacheId=f,Je.addToCache(c.baseTexture,f),Me.addToCache(c,f);var h=this.transform.localTransform.copyTo(jD).invert().translate(-i.x,-i.y);this.render=this._cacheData.originalRender,e.render(this,{renderTexture:c,clear:!0,transform:h,skipUpdateTransform:!1}),e.framebuffer.blit(),e.projection.transform=l,e.renderTexture.bind(o,s,u),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var d=new _i(c);d.transform.worldTransform=this.transform.worldTransform,d.anchor.x=-(i.x/i.width),d.anchor.y=-(i.y/i.height),d.alpha=n,d._bounds=this._bounds,this._cacheData.sprite=d,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=d.containsPoint.bind(d)}};Wt.prototype._renderCachedCanvas=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(e),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(e))};Wt.prototype._initCachedDisplayObjectCanvas=function(e){if(!(this._cacheData&&this._cacheData.sprite)){var r=this.getLocalBounds(null,!0),n=this.alpha;this.alpha=1;var i=e.context,a=e._projTransform;r.ceil(xe.RESOLUTION);var o=Co.create({width:r.width,height:r.height}),s="cacheAsBitmap_"+To();this._cacheData.textureCacheId=s,Je.addToCache(o.baseTexture,s),Me.addToCache(o,s);var u=jD;this.transform.localTransform.copyTo(u),u.invert(),u.tx-=r.x,u.ty-=r.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,{renderTexture:o,clear:!0,transform:u,skipUpdateTransform:!1}),e.context=i,e._projTransform=a,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var l=new _i(o);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-(r.x/r.width),l.anchor.y=-(r.y/r.height),l.alpha=n,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=l.containsPoint.bind(l)}};Wt.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID};Wt.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)};Wt.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,Je.removeFromCache(this._cacheData.textureCacheId),Me.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};Wt.prototype._cacheAsBitmapDestroy=function(e){this.cacheAsBitmap=!1,this.destroy(e)};/*! + */var UD=new Ut;Yt.prototype._cacheAsBitmap=!1;Yt.prototype._cacheData=null;Yt.prototype._cacheAsBitmapResolution=null;Yt.prototype._cacheAsBitmapMultisample=Ot.NONE;var hge=function(){function t(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}return t}();Object.defineProperties(Yt.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e;t?(this._cacheData||(this._cacheData=new hge),e=this._cacheData,e.originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}});Yt.prototype._renderCached=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(e),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(e))};Yt.prototype._initCachedDisplayObject=function(e){var r;if(!(this._cacheData&&this._cacheData.sprite)){var n=this.alpha;this.alpha=1,e.batch.flush();var i=this.getLocalBounds(null,!0).clone();if(this.filters&&this.filters.length){var a=this.filters[0].padding;i.pad(a)}i.ceil(xe.RESOLUTION);var o=e.renderTexture.current,s=e.renderTexture.sourceFrame.clone(),u=e.renderTexture.destinationFrame.clone(),l=e.projection.transform,c=Co.create({width:i.width,height:i.height,resolution:this.cacheAsBitmapResolution||e.resolution,multisample:(r=this.cacheAsBitmapMultisample)!==null&&r!==void 0?r:e.multisample}),f="cacheAsBitmap_"+To();this._cacheData.textureCacheId=f,Je.addToCache(c.baseTexture,f),Me.addToCache(c,f);var h=this.transform.localTransform.copyTo(UD).invert().translate(-i.x,-i.y);this.render=this._cacheData.originalRender,e.render(this,{renderTexture:c,clear:!0,transform:h,skipUpdateTransform:!1}),e.framebuffer.blit(),e.projection.transform=l,e.renderTexture.bind(o,s,u),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var d=new _i(c);d.transform.worldTransform=this.transform.worldTransform,d.anchor.x=-(i.x/i.width),d.anchor.y=-(i.y/i.height),d.alpha=n,d._bounds=this._bounds,this._cacheData.sprite=d,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=d.containsPoint.bind(d)}};Yt.prototype._renderCachedCanvas=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(e),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(e))};Yt.prototype._initCachedDisplayObjectCanvas=function(e){if(!(this._cacheData&&this._cacheData.sprite)){var r=this.getLocalBounds(null,!0),n=this.alpha;this.alpha=1;var i=e.context,a=e._projTransform;r.ceil(xe.RESOLUTION);var o=Co.create({width:r.width,height:r.height}),s="cacheAsBitmap_"+To();this._cacheData.textureCacheId=s,Je.addToCache(o.baseTexture,s),Me.addToCache(o,s);var u=UD;this.transform.localTransform.copyTo(u),u.invert(),u.tx-=r.x,u.ty-=r.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,{renderTexture:o,clear:!0,transform:u,skipUpdateTransform:!1}),e.context=i,e._projTransform=a,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var l=new _i(o);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-(r.x/r.width),l.anchor.y=-(r.y/r.height),l.alpha=n,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=l.containsPoint.bind(l)}};Yt.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID};Yt.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)};Yt.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,Je.removeFromCache(this._cacheData.textureCacheId),Me.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};Yt.prototype._cacheAsBitmapDestroy=function(e){this.cacheAsBitmap=!1,this.destroy(e)};/*! * @pixi/mixin-get-child-by-name - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/mixin-get-child-by-name is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license - */Wt.prototype.name=null;mr.prototype.getChildByName=function(e,r){for(var n=0,i=this.children.length;n0){var p=l.x-r[h].x,v=l.y-r[h].y,g=Math.sqrt(p*p+v*v);l=r[h],u+=g/c}else u=h/(f-1);o[d]=u,o[d+1]=0,o[d+2]=u,o[d+3]=1}for(var m=0,h=0;h0?this.textureScale*this._width/2:this._width/2;a/=h,o/=h,a*=d,o*=d,s[f]=c.x+a,s[f+1]=c.y+o,s[f+2]=c.x-a,s[f+3]=c.y-o,n=c}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(Kf),hge=function(t){bu(e,t);function e(r,n,i){i===void 0&&(i=0);var a=this,o=new VD(r.height,n,i),s=new Hl(r);return i>0&&(r.baseTexture.wrapMode=xi.REPEAT),a=t.call(this,o,s)||this,a.autoUpdate=!0,a}return e.prototype._render=function(r){var n=this.geometry;(this.autoUpdate||n._width!==this.shader.texture.height)&&(n._width=this.shader.texture.height,n.update()),t.prototype._render.call(this,r)},e}(Yl),GD=function(t){bu(e,t);function e(r,n,i){var a=this,o=new $D(r.width,r.height,n,i),s=new Hl(Me.WHITE);return a=t.call(this,o,s)||this,a.texture=r,a.autoResize=!0,a}return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var r=this.geometry,n=this.shader.texture,i=n.width,a=n.height;this.autoResize&&(r.width!==i||r.height!==a)&&(r.width=this.shader.texture.width,r.height=this.shader.texture.height,r.build())},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(r){this.shader.texture!==r&&(this.shader.texture=r,this._textureID=-1,r.baseTexture.valid?this.textureUpdated():r.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(r){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,r)},e.prototype.destroy=function(r){this.shader.texture.off("update",this.textureUpdated,this),t.prototype.destroy.call(this,r)},e}(Yl),XD=function(t){bu(e,t);function e(r,n,i,a,o){r===void 0&&(r=Me.EMPTY);var s=this,u=new Kf(n,i,a);u.getBuffer("aVertexPosition").static=!1;var l=new Hl(r);return s=t.call(this,u,l,null,o)||this,s.autoUpdate=!0,s}return Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(r){this.geometry.getBuffer("aVertexPosition").data=r},enumerable:!1,configurable:!0}),e.prototype._render=function(r){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,r)},e}(Yl),Wh=10,dge=function(t){bu(e,t);function e(r,n,i,a,o){n===void 0&&(n=Wh),i===void 0&&(i=Wh),a===void 0&&(a=Wh),o===void 0&&(o=Wh);var s=t.call(this,Me.WHITE,4,4)||this;return s._origWidth=r.orig.width,s._origHeight=r.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=n,s._rightWidth=a,s._topHeight=i,s._bottomHeight=o,s.texture=r,s}return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(r){this.geometry.getBuffer("aVertexPosition").data=r},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var r=this.vertices,n=this._getMinScale();r[9]=r[11]=r[13]=r[15]=this._topHeight*n,r[17]=r[19]=r[21]=r[23]=this._height-this._bottomHeight*n,r[25]=r[27]=r[29]=r[31]=this._height},e.prototype.updateVerticalVertices=function(){var r=this.vertices,n=this._getMinScale();r[2]=r[10]=r[18]=r[26]=this._leftWidth*n,r[4]=r[12]=r[20]=r[28]=this._width-this._rightWidth*n,r[6]=r[14]=r[22]=r[30]=this._width},e.prototype._getMinScale=function(){var r=this._leftWidth+this._rightWidth,n=this._width>r?1:this._width/r,i=this._topHeight+this._bottomHeight,a=this._height>i?1:this._height/i,o=Math.min(n,a);return o},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(r){this._width=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(r){this._height=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(r){this._leftWidth=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(r){this._rightWidth=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(r){this._topHeight=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(r){this._bottomHeight=r,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var r=this.texture,n=this.geometry.buffers[1].data;this._origWidth=r.orig.width,this._origHeight=r.orig.height;var i=1/this._origWidth,a=1/this._origHeight;n[0]=n[8]=n[16]=n[24]=0,n[1]=n[3]=n[5]=n[7]=0,n[6]=n[14]=n[22]=n[30]=1,n[25]=n[27]=n[29]=n[31]=1,n[2]=n[10]=n[18]=n[26]=i*this._leftWidth,n[4]=n[12]=n[20]=n[28]=1-i*this._rightWidth,n[9]=n[11]=n[13]=n[15]=a*this._topHeight,n[17]=n[19]=n[21]=n[23]=1-a*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},e}(GD);/*! +***************************************************************************** */var vx=function(t,e){return vx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},vx(t,e)};function bu(t,e){vx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var VD=function(t){bu(e,t);function e(r,n,i,a){r===void 0&&(r=100),n===void 0&&(n=100),i===void 0&&(i=10),a===void 0&&(a=10);var o=t.call(this)||this;return o.segWidth=i,o.segHeight=a,o.width=r,o.height=n,o.build(),o}return e.prototype.build=function(){for(var r=this.segWidth*this.segHeight,n=[],i=[],a=[],o=this.segWidth-1,s=this.segHeight-1,u=this.width/o,l=this.height/s,c=0;c0){var p=l.x-r[h].x,v=l.y-r[h].y,g=Math.sqrt(p*p+v*v);l=r[h],u+=g/c}else u=h/(f-1);o[d]=u,o[d+1]=0,o[d+2]=u,o[d+3]=1}for(var m=0,h=0;h0?this.textureScale*this._width/2:this._width/2;a/=h,o/=h,a*=d,o*=d,s[f]=c.x+a,s[f+1]=c.y+o,s[f+2]=c.x-a,s[f+3]=c.y-o,n=c}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(Kf),dge=function(t){bu(e,t);function e(r,n,i){i===void 0&&(i=0);var a=this,o=new GD(r.height,n,i),s=new Hl(r);return i>0&&(r.baseTexture.wrapMode=xi.REPEAT),a=t.call(this,o,s)||this,a.autoUpdate=!0,a}return e.prototype._render=function(r){var n=this.geometry;(this.autoUpdate||n._width!==this.shader.texture.height)&&(n._width=this.shader.texture.height,n.update()),t.prototype._render.call(this,r)},e}(Yl),XD=function(t){bu(e,t);function e(r,n,i){var a=this,o=new VD(r.width,r.height,n,i),s=new Hl(Me.WHITE);return a=t.call(this,o,s)||this,a.texture=r,a.autoResize=!0,a}return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var r=this.geometry,n=this.shader.texture,i=n.width,a=n.height;this.autoResize&&(r.width!==i||r.height!==a)&&(r.width=this.shader.texture.width,r.height=this.shader.texture.height,r.build())},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(r){this.shader.texture!==r&&(this.shader.texture=r,this._textureID=-1,r.baseTexture.valid?this.textureUpdated():r.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(r){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,r)},e.prototype.destroy=function(r){this.shader.texture.off("update",this.textureUpdated,this),t.prototype.destroy.call(this,r)},e}(Yl),zD=function(t){bu(e,t);function e(r,n,i,a,o){r===void 0&&(r=Me.EMPTY);var s=this,u=new Kf(n,i,a);u.getBuffer("aVertexPosition").static=!1;var l=new Hl(r);return s=t.call(this,u,l,null,o)||this,s.autoUpdate=!0,s}return Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(r){this.geometry.getBuffer("aVertexPosition").data=r},enumerable:!1,configurable:!0}),e.prototype._render=function(r){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,r)},e}(Yl),Wh=10,pge=function(t){bu(e,t);function e(r,n,i,a,o){n===void 0&&(n=Wh),i===void 0&&(i=Wh),a===void 0&&(a=Wh),o===void 0&&(o=Wh);var s=t.call(this,Me.WHITE,4,4)||this;return s._origWidth=r.orig.width,s._origHeight=r.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=n,s._rightWidth=a,s._topHeight=i,s._bottomHeight=o,s.texture=r,s}return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(r){this.geometry.getBuffer("aVertexPosition").data=r},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var r=this.vertices,n=this._getMinScale();r[9]=r[11]=r[13]=r[15]=this._topHeight*n,r[17]=r[19]=r[21]=r[23]=this._height-this._bottomHeight*n,r[25]=r[27]=r[29]=r[31]=this._height},e.prototype.updateVerticalVertices=function(){var r=this.vertices,n=this._getMinScale();r[2]=r[10]=r[18]=r[26]=this._leftWidth*n,r[4]=r[12]=r[20]=r[28]=this._width-this._rightWidth*n,r[6]=r[14]=r[22]=r[30]=this._width},e.prototype._getMinScale=function(){var r=this._leftWidth+this._rightWidth,n=this._width>r?1:this._width/r,i=this._topHeight+this._bottomHeight,a=this._height>i?1:this._height/i,o=Math.min(n,a);return o},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(r){this._width=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(r){this._height=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(r){this._leftWidth=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(r){this._rightWidth=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(r){this._topHeight=r,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(r){this._bottomHeight=r,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var r=this.texture,n=this.geometry.buffers[1].data;this._origWidth=r.orig.width,this._origHeight=r.orig.height;var i=1/this._origWidth,a=1/this._origHeight;n[0]=n[8]=n[16]=n[24]=0,n[1]=n[3]=n[5]=n[7]=0,n[6]=n[14]=n[22]=n[30]=1,n[25]=n[27]=n[29]=n[31]=1,n[2]=n[10]=n[18]=n[26]=i*this._leftWidth,n[4]=n[12]=n[20]=n[28]=1-i*this._rightWidth,n[9]=n[11]=n[13]=n[15]=a*this._topHeight,n[17]=n[19]=n[21]=n[23]=1-a*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},e}(XD);/*! * @pixi/sprite-animated - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -1633,13 +1633,13 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var vx=function(t,e){return vx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},vx(t,e)};function pge(t,e){vx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var vge=function(t){pge(e,t);function e(r,n){n===void 0&&(n=!0);var i=t.call(this,r[0]instanceof Me?r[0]:r[0].texture)||this;return i._textures=null,i._durations=null,i._autoUpdate=n,i._isConnectedToTicker=!1,i.animationSpeed=1,i.loop=!0,i.updateAnchor=!1,i.onComplete=null,i.onFrameChange=null,i.onLoop=null,i._currentTime=0,i._playing=!1,i._previousFrame=null,i.textures=r,i}return e.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Or.shared.remove(this.update,this),this._isConnectedToTicker=!1))},e.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Or.shared.add(this.update,this,ra.HIGH),this._isConnectedToTicker=!0))},e.prototype.gotoAndStop=function(r){this.stop();var n=this.currentFrame;this._currentTime=r,n!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(r){var n=this.currentFrame;this._currentTime=r,n!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(r){if(this._playing){var n=this.animationSpeed*r,i=this.currentFrame;if(this._durations!==null){var a=this._currentTime%1*this._durations[this.currentFrame];for(a+=n/60*1e3;a<0;)this._currentTime--,a+=this._durations[this.currentFrame];var o=Math.sign(this.animationSpeed*r);for(this._currentTime=Math.floor(this._currentTime);a>=this._durations[this.currentFrame];)a-=this._durations[this.currentFrame]*o,this._currentTime+=o;this._currentTime+=a/this._durations[this.currentFrame]}else this._currentTime+=n;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei&&this.onLoop()),this.updateTexture())}},e.prototype.updateTexture=function(){var r=this.currentFrame;this._previousFrame!==r&&(this._previousFrame=r,this._texture=this._textures[r],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},e.prototype.destroy=function(r){this.stop(),t.prototype.destroy.call(this,r),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(r){for(var n=[],i=0;i=this._durations[this.currentFrame];)a-=this._durations[this.currentFrame]*o,this._currentTime+=o;this._currentTime+=a/this._durations[this.currentFrame]}else this._currentTime+=n;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):i!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramei&&this.onLoop()),this.updateTexture())}},e.prototype.updateTexture=function(){var r=this.currentFrame;this._previousFrame!==r&&(this._previousFrame=r,this._texture=this._textures[r],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},e.prototype.destroy=function(r){this.stop(),t.prototype.destroy.call(this,r),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(r){for(var n=[],i=0;i0;i--){var a=Math.random()*i>>0,o=r[i];r[i]=r[a],r[a]=o}},e.prototype._randomizeOffsets=function(){for(var r=0;r0?a:0,c=a<0?-a:0;i.fillStyle="rgba("+l+", "+c+", 0, 1)",i.fillRect(0,o>>0,r,u+1>>0),o+=u}n.baseTexture.update(),this.uniforms.displacementMap=n},Object.defineProperty(e.prototype,"sizes",{get:function(){return this._sizes},set:function(r){for(var n=Math.min(this._slices,r.length),i=0;i0;i--){var a=Math.random()*i>>0,o=r[i];r[i]=r[a],r[a]=o}},e.prototype._randomizeOffsets=function(){for(var r=0;r0?a:0,c=a<0?-a:0;i.fillStyle="rgba("+l+", "+c+", 0, 1)",i.fillRect(0,o>>0,r,u+1>>0),o+=u}n.baseTexture.update(),this.uniforms.displacementMap=n},Object.defineProperty(e.prototype,"sizes",{get:function(){return this._sizes},set:function(r){for(var n=Math.min(this._slices,r.length),i=0;i0)for(var a=r,o=r/n,s=1;s0?(this._kernels=r,this._quality=r.length,this._blur=Math.max.apply(Math,r)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clamp",{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pixelSize",{get:function(){return this._pixelSize},set:function(r){typeof r=="number"?(this._pixelSize.x=r,this._pixelSize.y=r):Array.isArray(r)?(this._pixelSize.x=r[0],this._pixelSize.y=r[1]):r instanceof We?(this._pixelSize.x=r.x,this._pixelSize.y=r.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._quality},set:function(r){this._quality=Math.max(1,Math.round(r)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blur",{get:function(){return this._blur},set:function(r){this._blur=r,this._generateKernels()},enumerable:!1,configurable:!0}),e}(De);/*! +`,Ap=function(t){Kge(e,t);function e(r,n,i){r===void 0&&(r=4),n===void 0&&(n=3),i===void 0&&(i=!1);var a=t.call(this,Zge,i?Jge:Qge)||this;return a._kernels=[],a._blur=4,a._quality=3,a.uniforms.uOffset=new Float32Array(2),a._pixelSize=new We,a.pixelSize=1,a._clamp=i,Array.isArray(r)?a.kernels=r:(a._blur=r,a.quality=n),a}return e.prototype.apply=function(r,n,i,a){var o=this._pixelSize.x/n._frame.width,s=this._pixelSize.y/n._frame.height,u;if(this._quality===1||this._blur===0)u=this._kernels[0]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*s,r.applyFilter(this,n,i,a);else{for(var l=r.getFilterTexture(),c=n,f=l,h=void 0,d=this._quality-1,p=0;p0)for(var a=r,o=r/n,s=1;s0?(this._kernels=r,this._quality=r.length,this._blur=Math.max.apply(Math,r)):(this._kernels=[0],this._quality=1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clamp",{get:function(){return this._clamp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pixelSize",{get:function(){return this._pixelSize},set:function(r){typeof r=="number"?(this._pixelSize.x=r,this._pixelSize.y=r):Array.isArray(r)?(this._pixelSize.x=r[0],this._pixelSize.y=r[1]):r instanceof We?(this._pixelSize.x=r.x,this._pixelSize.y=r.y):(this._pixelSize.x=1,this._pixelSize.y=1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._quality},set:function(r){this._quality=Math.max(1,Math.round(r)),this._generateKernels()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blur",{get:function(){return this._blur},set:function(r){this._blur=r,this._generateKernels()},enumerable:!1,configurable:!0}),e}(De);/*! * @pixi/filter-advanced-bloom - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -2412,7 +2412,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Tx=function(t,e){return Tx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Tx(t,e)};function zD(t,e){Tx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var WD=`attribute vec2 aVertexPosition; +***************************************************************************** */var Ax=function(t,e){return Ax=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ax(t,e)};function WD(t,e){Ax(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var YD=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -2423,7 +2423,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,Jge=` +}`,eye=` uniform sampler2D uSampler; varying vec2 vTextureCoord; @@ -2444,7 +2444,7 @@ void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); } } -`,eye=function(t){zD(e,t);function e(r){r===void 0&&(r=.5);var n=t.call(this,WD,Jge)||this;return n.threshold=r,n}return Object.defineProperty(e.prototype,"threshold",{get:function(){return this.uniforms.threshold},set:function(r){this.uniforms.threshold=r},enumerable:!1,configurable:!0}),e}(De),tye=`uniform sampler2D uSampler; +`,tye=function(t){WD(e,t);function e(r){r===void 0&&(r=.5);var n=t.call(this,YD,eye)||this;return n.threshold=r,n}return Object.defineProperty(e.prototype,"threshold",{get:function(){return this.uniforms.threshold},set:function(r){this.uniforms.threshold=r},enumerable:!1,configurable:!0}),e}(De),rye=`uniform sampler2D uSampler; varying vec2 vTextureCoord; uniform sampler2D bloomTexture; @@ -2458,7 +2458,7 @@ void main() { bloomColor.rgb *= bloomScale; gl_FragColor = color + bloomColor; } -`;(function(t){zD(e,t);function e(r){var n=t.call(this,WD,tye)||this;n.bloomScale=1,n.brightness=1,n._resolution=xe.FILTER_RESOLUTION,typeof r=="number"&&(r={threshold:r});var i=Object.assign(e.defaults,r);n.bloomScale=i.bloomScale,n.brightness=i.brightness;var a=i.kernels,o=i.blur,s=i.quality,u=i.pixelSize,l=i.resolution;return n._extractFilter=new eye(i.threshold),n._extractFilter.resolution=l,n._blurFilter=a?new Ap(a):new Ap(o,s),n.pixelSize=u,n.resolution=l,n}return e.prototype.apply=function(r,n,i,a,o){var s=r.getFilterTexture();this._extractFilter.apply(r,n,s,1,o);var u=r.getFilterTexture();this._blurFilter.apply(r,s,u,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=u,r.applyFilter(this,n,i,a),r.returnFilterTexture(u),r.returnFilterTexture(s)},Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(r){this._resolution=r,this._extractFilter&&(this._extractFilter.resolution=r),this._blurFilter&&(this._blurFilter.resolution=r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"threshold",{get:function(){return this._extractFilter.threshold},set:function(r){this._extractFilter.threshold=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"kernels",{get:function(){return this._blurFilter.kernels},set:function(r){this._blurFilter.kernels=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blur",{get:function(){return this._blurFilter.blur},set:function(r){this._blurFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._blurFilter.quality},set:function(r){this._blurFilter.quality=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pixelSize",{get:function(){return this._blurFilter.pixelSize},set:function(r){this._blurFilter.pixelSize=r},enumerable:!1,configurable:!0}),e.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:xe.FILTER_RESOLUTION},e})(De);/*! +`;(function(t){WD(e,t);function e(r){var n=t.call(this,YD,rye)||this;n.bloomScale=1,n.brightness=1,n._resolution=xe.FILTER_RESOLUTION,typeof r=="number"&&(r={threshold:r});var i=Object.assign(e.defaults,r);n.bloomScale=i.bloomScale,n.brightness=i.brightness;var a=i.kernels,o=i.blur,s=i.quality,u=i.pixelSize,l=i.resolution;return n._extractFilter=new tye(i.threshold),n._extractFilter.resolution=l,n._blurFilter=a?new Ap(a):new Ap(o,s),n.pixelSize=u,n.resolution=l,n}return e.prototype.apply=function(r,n,i,a,o){var s=r.getFilterTexture();this._extractFilter.apply(r,n,s,1,o);var u=r.getFilterTexture();this._blurFilter.apply(r,s,u,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=u,r.applyFilter(this,n,i,a),r.returnFilterTexture(u),r.returnFilterTexture(s)},Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(r){this._resolution=r,this._extractFilter&&(this._extractFilter.resolution=r),this._blurFilter&&(this._blurFilter.resolution=r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"threshold",{get:function(){return this._extractFilter.threshold},set:function(r){this._extractFilter.threshold=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"kernels",{get:function(){return this._blurFilter.kernels},set:function(r){this._blurFilter.kernels=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blur",{get:function(){return this._blurFilter.blur},set:function(r){this._blurFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._blurFilter.quality},set:function(r){this._blurFilter.quality=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pixelSize",{get:function(){return this._blurFilter.pixelSize},set:function(r){this._blurFilter.pixelSize=r},enumerable:!1,configurable:!0}),e.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:xe.FILTER_RESOLUTION},e})(De);/*! * @pixi/filter-ascii - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -2477,7 +2477,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Ax=function(t,e){return Ax=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ax(t,e)};function rye(t,e){Ax(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var nye=`attribute vec2 aVertexPosition; +***************************************************************************** */var Cx=function(t,e){return Cx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Cx(t,e)};function nye(t,e){Cx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var iye=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -2488,7 +2488,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,iye=`varying vec2 vTextureCoord; +}`,aye=`varying vec2 vTextureCoord; uniform vec4 filterArea; uniform float pixelSize; @@ -2562,7 +2562,7 @@ void main() gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0); } -`;(function(t){rye(e,t);function e(r){r===void 0&&(r=8);var n=t.call(this,nye,iye)||this;return n.size=r,n}return Object.defineProperty(e.prototype,"size",{get:function(){return this.uniforms.pixelSize},set:function(r){this.uniforms.pixelSize=r},enumerable:!1,configurable:!0}),e})(De);/*! +`;(function(t){nye(e,t);function e(r){r===void 0&&(r=8);var n=t.call(this,iye,aye)||this;return n.size=r,n}return Object.defineProperty(e.prototype,"size",{get:function(){return this.uniforms.pixelSize},set:function(r){this.uniforms.pixelSize=r},enumerable:!1,configurable:!0}),e})(De);/*! * @pixi/filter-bevel - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -2581,7 +2581,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Cx=function(t,e){return Cx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Cx(t,e)};function aye(t,e){Cx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var oye=`attribute vec2 aVertexPosition; +***************************************************************************** */var Px=function(t,e){return Px=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Px(t,e)};function oye(t,e){Px(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var sye=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -2592,7 +2592,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,sye=`precision mediump float; +}`,lye=`precision mediump float; varying vec2 vTextureCoord; uniform sampler2D uSampler; @@ -2615,7 +2615,7 @@ void main(void) { color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0)); gl_FragColor = vec4(color.rgb * color.a, color.a); } -`;(function(t){aye(e,t);function e(r){var n=t.call(this,oye,sye)||this;return n._thickness=2,n._angle=0,n.uniforms.lightColor=new Float32Array(3),n.uniforms.shadowColor=new Float32Array(3),Object.assign(n,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},r),n.padding=1,n}return e.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(e.prototype,"rotation",{get:function(){return this._angle/Ao},set:function(r){this._angle=r*Ao,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(r){this._thickness=r,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lightColor",{get:function(){return dn(this.uniforms.lightColor)},set:function(r){gr(r,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lightAlpha",{get:function(){return this.uniforms.lightAlpha},set:function(r){this.uniforms.lightAlpha=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shadowColor",{get:function(){return dn(this.uniforms.shadowColor)},set:function(r){gr(r,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shadowAlpha",{get:function(){return this.uniforms.shadowAlpha},set:function(r){this.uniforms.shadowAlpha=r},enumerable:!1,configurable:!0}),e})(De);/*! +`;(function(t){oye(e,t);function e(r){var n=t.call(this,sye,lye)||this;return n._thickness=2,n._angle=0,n.uniforms.lightColor=new Float32Array(3),n.uniforms.shadowColor=new Float32Array(3),Object.assign(n,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},r),n.padding=1,n}return e.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},Object.defineProperty(e.prototype,"rotation",{get:function(){return this._angle/Ao},set:function(r){this._angle=r*Ao,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(r){this._thickness=r,this._updateTransform()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lightColor",{get:function(){return dn(this.uniforms.lightColor)},set:function(r){yr(r,this.uniforms.lightColor)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lightAlpha",{get:function(){return this.uniforms.lightAlpha},set:function(r){this.uniforms.lightAlpha=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shadowColor",{get:function(){return dn(this.uniforms.shadowColor)},set:function(r){yr(r,this.uniforms.shadowColor)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shadowAlpha",{get:function(){return this.uniforms.shadowAlpha},set:function(r){this.uniforms.shadowAlpha=r},enumerable:!1,configurable:!0}),e})(De);/*! * @pixi/filter-bloom - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -2634,7 +2634,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Px=function(t,e){return Px=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Px(t,e)};function lye(t,e){Px(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}(function(t){lye(e,t);function e(r,n,i,a){r===void 0&&(r=2),n===void 0&&(n=4),i===void 0&&(i=xe.FILTER_RESOLUTION),a===void 0&&(a=5);var o=t.call(this)||this,s,u;return typeof r=="number"?(s=r,u=r):r instanceof We?(s=r.x,u=r.y):Array.isArray(r)&&(s=r[0],u=r[1]),o.blurXFilter=new mf(!0,s,n,i,a),o.blurYFilter=new mf(!1,u,n,i,a),o.blurYFilter.blendMode=Se.SCREEN,o.defaultFilter=new DD,o}return e.prototype.apply=function(r,n,i,a){var o=r.getFilterTexture();this.defaultFilter.apply(r,n,i,a),this.blurXFilter.apply(r,n,o,1),this.blurYFilter.apply(r,o,i,0),r.returnFilterTexture(o)},Object.defineProperty(e.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(r){this.blurXFilter.blur=this.blurYFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(r){this.blurXFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(r){this.blurYFilter.blur=r},enumerable:!1,configurable:!0}),e})(De);/*! +***************************************************************************** */var Ox=function(t,e){return Ox=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ox(t,e)};function uye(t,e){Ox(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}(function(t){uye(e,t);function e(r,n,i,a){r===void 0&&(r=2),n===void 0&&(n=4),i===void 0&&(i=xe.FILTER_RESOLUTION),a===void 0&&(a=5);var o=t.call(this)||this,s,u;return typeof r=="number"?(s=r,u=r):r instanceof We?(s=r.x,u=r.y):Array.isArray(r)&&(s=r[0],u=r[1]),o.blurXFilter=new mf(!0,s,n,i,a),o.blurYFilter=new mf(!1,u,n,i,a),o.blurYFilter.blendMode=Se.SCREEN,o.defaultFilter=new BD,o}return e.prototype.apply=function(r,n,i,a){var o=r.getFilterTexture();this.defaultFilter.apply(r,n,i,a),this.blurXFilter.apply(r,n,o,1),this.blurYFilter.apply(r,o,i,0),r.returnFilterTexture(o)},Object.defineProperty(e.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(r){this.blurXFilter.blur=this.blurYFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(r){this.blurXFilter.blur=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(r){this.blurYFilter.blur=r},enumerable:!1,configurable:!0}),e})(De);/*! * @pixi/filter-bulge-pinch - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -2653,7 +2653,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Ox=function(t,e){return Ox=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ox(t,e)};function uye(t,e){Ox(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var cye=`attribute vec2 aVertexPosition; +***************************************************************************** */var Rx=function(t,e){return Rx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Rx(t,e)};function cye(t,e){Rx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var fye=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -2664,7 +2664,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,fye=`uniform float radius; +}`,hye=`uniform float radius; uniform float strength; uniform vec2 center; uniform sampler2D uSampler; @@ -2697,7 +2697,7 @@ void main() gl_FragColor = color; } -`;(function(t){uye(e,t);function e(r){var n=t.call(this,cye,fye)||this;return n.uniforms.dimensions=new Float32Array(2),Object.assign(n,e.defaults,r),n}return e.prototype.apply=function(r,n,i,a){var o=n.filterFrame,s=o.width,u=o.height;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=u,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(r){this.uniforms.radius=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"strength",{get:function(){return this.uniforms.strength},set:function(r){this.uniforms.strength=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return this.uniforms.center},set:function(r){this.uniforms.center=r},enumerable:!1,configurable:!0}),e.defaults={center:[.5,.5],radius:100,strength:1},e})(De);/*! +`;(function(t){cye(e,t);function e(r){var n=t.call(this,fye,hye)||this;return n.uniforms.dimensions=new Float32Array(2),Object.assign(n,e.defaults,r),n}return e.prototype.apply=function(r,n,i,a){var o=n.filterFrame,s=o.width,u=o.height;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=u,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"radius",{get:function(){return this.uniforms.radius},set:function(r){this.uniforms.radius=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"strength",{get:function(){return this.uniforms.strength},set:function(r){this.uniforms.strength=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"center",{get:function(){return this.uniforms.center},set:function(r){this.uniforms.center=r},enumerable:!1,configurable:!0}),e.defaults={center:[.5,.5],radius:100,strength:1},e})(De);/*! * @pixi/filter-color-map - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -2716,7 +2716,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Rx=function(t,e){return Rx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Rx(t,e)};function hye(t,e){Rx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var dye=`attribute vec2 aVertexPosition; +***************************************************************************** */var Ix=function(t,e){return Ix=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ix(t,e)};function dye(t,e){Ix(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var pye=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -2727,7 +2727,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,pye=`varying vec2 vTextureCoord; +}`,vye=`varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform sampler2D colorMap; uniform float _mix; @@ -2757,7 +2757,7 @@ void main() { } gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a); -}`;(function(t){hye(e,t);function e(r,n,i){n===void 0&&(n=!1),i===void 0&&(i=1);var a=t.call(this,dye,pye)||this;return a.mix=1,a._size=0,a._sliceSize=0,a._slicePixelSize=0,a._sliceInnerSize=0,a._nearest=!1,a._scaleMode=null,a._colorMap=null,a._scaleMode=null,a.nearest=n,a.mix=i,a.colorMap=r,a}return e.prototype.apply=function(r,n,i,a){this.uniforms._mix=this.mix,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"colorSize",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"colorMap",{get:function(){return this._colorMap},set:function(r){var n;r&&(r instanceof Me||(r=Me.from(r)),!((n=r)===null||n===void 0)&&n.baseTexture&&(r.baseTexture.scaleMode=this._scaleMode,r.baseTexture.mipmap=mn.OFF,this._size=r.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=r),this._colorMap=r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nearest",{get:function(){return this._nearest},set:function(r){this._nearest=r,this._scaleMode=r?Ir.NEAREST:Ir.LINEAR;var n=this._colorMap;n&&n.baseTexture&&(n.baseTexture._glTextures={},n.baseTexture.scaleMode=this._scaleMode,n.baseTexture.mipmap=mn.OFF,n._updateID++,n.baseTexture.emit("update",n.baseTexture))},enumerable:!1,configurable:!0}),e.prototype.updateColorMap=function(){var r=this._colorMap;r&&r.baseTexture&&(r._updateID++,r.baseTexture.emit("update",r.baseTexture),this.colorMap=r)},e.prototype.destroy=function(r){r===void 0&&(r=!1),this._colorMap&&this._colorMap.destroy(r),t.prototype.destroy.call(this)},e})(De);/*! +}`;(function(t){dye(e,t);function e(r,n,i){n===void 0&&(n=!1),i===void 0&&(i=1);var a=t.call(this,pye,vye)||this;return a.mix=1,a._size=0,a._sliceSize=0,a._slicePixelSize=0,a._sliceInnerSize=0,a._nearest=!1,a._scaleMode=null,a._colorMap=null,a._scaleMode=null,a.nearest=n,a.mix=i,a.colorMap=r,a}return e.prototype.apply=function(r,n,i,a){this.uniforms._mix=this.mix,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"colorSize",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"colorMap",{get:function(){return this._colorMap},set:function(r){var n;r&&(r instanceof Me||(r=Me.from(r)),!((n=r)===null||n===void 0)&&n.baseTexture&&(r.baseTexture.scaleMode=this._scaleMode,r.baseTexture.mipmap=mn.OFF,this._size=r.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=r),this._colorMap=r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nearest",{get:function(){return this._nearest},set:function(r){this._nearest=r,this._scaleMode=r?Ir.NEAREST:Ir.LINEAR;var n=this._colorMap;n&&n.baseTexture&&(n.baseTexture._glTextures={},n.baseTexture.scaleMode=this._scaleMode,n.baseTexture.mipmap=mn.OFF,n._updateID++,n.baseTexture.emit("update",n.baseTexture))},enumerable:!1,configurable:!0}),e.prototype.updateColorMap=function(){var r=this._colorMap;r&&r.baseTexture&&(r._updateID++,r.baseTexture.emit("update",r.baseTexture),this.colorMap=r)},e.prototype.destroy=function(r){r===void 0&&(r=!1),this._colorMap&&this._colorMap.destroy(r),t.prototype.destroy.call(this)},e})(De);/*! * @pixi/filter-color-overlay - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -2776,7 +2776,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Ix=function(t,e){return Ix=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ix(t,e)};function vye(t,e){Ix(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var mye=`attribute vec2 aVertexPosition; +***************************************************************************** */var kx=function(t,e){return kx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},kx(t,e)};function mye(t,e){kx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var gye=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -2787,7 +2787,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,gye=`varying vec2 vTextureCoord; +}`,yye=`varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform vec3 color; uniform float alpha; @@ -2796,7 +2796,7 @@ void main(void) { vec4 currentColor = texture2D(uSampler, vTextureCoord); gl_FragColor = vec4(mix(currentColor.rgb, color.rgb, currentColor.a * alpha), currentColor.a); } -`;(function(t){vye(e,t);function e(r,n){r===void 0&&(r=0),n===void 0&&(n=1);var i=t.call(this,mye,gye)||this;return i._color=0,i._alpha=1,i.uniforms.color=new Float32Array(3),i.color=r,i.alpha=n,i}return Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(r){var n=this.uniforms.color;typeof r=="number"?(gr(r,n),this._color=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._color=dn(n))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(r){this.uniforms.alpha=r,this._alpha=r},enumerable:!1,configurable:!0}),e})(De);/*! +`;(function(t){mye(e,t);function e(r,n){r===void 0&&(r=0),n===void 0&&(n=1);var i=t.call(this,gye,yye)||this;return i._color=0,i._alpha=1,i.uniforms.color=new Float32Array(3),i.color=r,i.alpha=n,i}return Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(r){var n=this.uniforms.color;typeof r=="number"?(yr(r,n),this._color=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._color=dn(n))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(r){this.uniforms.alpha=r,this._alpha=r},enumerable:!1,configurable:!0}),e})(De);/*! * @pixi/filter-color-replace - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -2815,7 +2815,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var kx=function(t,e){return kx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},kx(t,e)};function yye(t,e){kx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var _ye=`attribute vec2 aVertexPosition; +***************************************************************************** */var Mx=function(t,e){return Mx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Mx(t,e)};function _ye(t,e){Mx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var xye=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -2826,7 +2826,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,xye=`varying vec2 vTextureCoord; +}`,bye=`varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform vec3 originalColor; uniform vec3 newColor; @@ -2838,7 +2838,7 @@ void main(void) { float doReplace = step(colorDistance, epsilon); gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a); } -`;(function(t){yye(e,t);function e(r,n,i){r===void 0&&(r=16711680),n===void 0&&(n=0),i===void 0&&(i=.4);var a=t.call(this,_ye,xye)||this;return a._originalColor=16711680,a._newColor=0,a.uniforms.originalColor=new Float32Array(3),a.uniforms.newColor=new Float32Array(3),a.originalColor=r,a.newColor=n,a.epsilon=i,a}return Object.defineProperty(e.prototype,"originalColor",{get:function(){return this._originalColor},set:function(r){var n=this.uniforms.originalColor;typeof r=="number"?(gr(r,n),this._originalColor=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._originalColor=dn(n))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"newColor",{get:function(){return this._newColor},set:function(r){var n=this.uniforms.newColor;typeof r=="number"?(gr(r,n),this._newColor=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._newColor=dn(n))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"epsilon",{get:function(){return this.uniforms.epsilon},set:function(r){this.uniforms.epsilon=r},enumerable:!1,configurable:!0}),e})(De);/*! +`;(function(t){_ye(e,t);function e(r,n,i){r===void 0&&(r=16711680),n===void 0&&(n=0),i===void 0&&(i=.4);var a=t.call(this,xye,bye)||this;return a._originalColor=16711680,a._newColor=0,a.uniforms.originalColor=new Float32Array(3),a.uniforms.newColor=new Float32Array(3),a.originalColor=r,a.newColor=n,a.epsilon=i,a}return Object.defineProperty(e.prototype,"originalColor",{get:function(){return this._originalColor},set:function(r){var n=this.uniforms.originalColor;typeof r=="number"?(yr(r,n),this._originalColor=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._originalColor=dn(n))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"newColor",{get:function(){return this._newColor},set:function(r){var n=this.uniforms.newColor;typeof r=="number"?(yr(r,n),this._newColor=r):(n[0]=r[0],n[1]=r[1],n[2]=r[2],this._newColor=dn(n))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"epsilon",{get:function(){return this.uniforms.epsilon},set:function(r){this.uniforms.epsilon=r},enumerable:!1,configurable:!0}),e})(De);/*! * @pixi/filter-convolution - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -2857,7 +2857,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Mx=function(t,e){return Mx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Mx(t,e)};function bye(t,e){Mx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Sye=`attribute vec2 aVertexPosition; +***************************************************************************** */var Fx=function(t,e){return Fx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Fx(t,e)};function Sye(t,e){Fx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var wye=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -2868,7 +2868,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,wye=`precision mediump float; +}`,Eye=`precision mediump float; varying mediump vec2 vTextureCoord; @@ -2897,7 +2897,7 @@ void main(void) gl_FragColor.a = c22.a; } -`;(function(t){bye(e,t);function e(r,n,i){n===void 0&&(n=200),i===void 0&&(i=200);var a=t.call(this,Sye,wye)||this;return a.uniforms.texelSize=new Float32Array(2),a.uniforms.matrix=new Float32Array(9),r!==void 0&&(a.matrix=r),a.width=n,a.height=i,a}return Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.matrix},set:function(r){var n=this;r.forEach(function(i,a){n.uniforms.matrix[a]=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return 1/this.uniforms.texelSize[0]},set:function(r){this.uniforms.texelSize[0]=1/r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return 1/this.uniforms.texelSize[1]},set:function(r){this.uniforms.texelSize[1]=1/r},enumerable:!1,configurable:!0}),e})(De);/*! +`;(function(t){Sye(e,t);function e(r,n,i){n===void 0&&(n=200),i===void 0&&(i=200);var a=t.call(this,wye,Eye)||this;return a.uniforms.texelSize=new Float32Array(2),a.uniforms.matrix=new Float32Array(9),r!==void 0&&(a.matrix=r),a.width=n,a.height=i,a}return Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.matrix},set:function(r){var n=this;r.forEach(function(i,a){n.uniforms.matrix[a]=i})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return 1/this.uniforms.texelSize[0]},set:function(r){this.uniforms.texelSize[0]=1/r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return 1/this.uniforms.texelSize[1]},set:function(r){this.uniforms.texelSize[1]=1/r},enumerable:!1,configurable:!0}),e})(De);/*! * @pixi/filter-cross-hatch - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -2916,7 +2916,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Fx=function(t,e){return Fx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Fx(t,e)};function Eye(t,e){Fx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Tye=`attribute vec2 aVertexPosition; +***************************************************************************** */var Nx=function(t,e){return Nx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Nx(t,e)};function Tye(t,e){Nx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Aye=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -2927,7 +2927,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,Aye=`precision mediump float; +}`,Cye=`precision mediump float; varying vec2 vTextureCoord; @@ -2971,7 +2971,7 @@ void main(void) } } } -`;(function(t){Eye(e,t);function e(){return t.call(this,Tye,Aye)||this}return e})(De);/*! +`;(function(t){Tye(e,t);function e(){return t.call(this,Aye,Cye)||this}return e})(De);/*! * @pixi/filter-crt - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -2990,7 +2990,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Nx=function(t,e){return Nx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Nx(t,e)};function Cye(t,e){Nx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Pye=`attribute vec2 aVertexPosition; +***************************************************************************** */var Lx=function(t,e){return Lx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Lx(t,e)};function Pye(t,e){Lx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Oye=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -3001,7 +3001,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,Oye=`varying vec2 vTextureCoord; +}`,Rye=`varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform vec4 filterArea; @@ -3067,7 +3067,7 @@ void main(void) gl_FragColor.rgb = rgb; } -`;(function(t){Cye(e,t);function e(r){var n=t.call(this,Pye,Oye)||this;return n.time=0,n.seed=0,n.uniforms.dimensions=new Float32Array(2),Object.assign(n,e.defaults,r),n}return e.prototype.apply=function(r,n,i,a){var o=n.filterFrame,s=o.width,u=o.height;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=u,this.uniforms.seed=this.seed,this.uniforms.time=this.time,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"curvature",{get:function(){return this.uniforms.curvature},set:function(r){this.uniforms.curvature=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineWidth",{get:function(){return this.uniforms.lineWidth},set:function(r){this.uniforms.lineWidth=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineContrast",{get:function(){return this.uniforms.lineContrast},set:function(r){this.uniforms.lineContrast=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalLine",{get:function(){return this.uniforms.verticalLine},set:function(r){this.uniforms.verticalLine=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.noise},set:function(r){this.uniforms.noise=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"noiseSize",{get:function(){return this.uniforms.noiseSize},set:function(r){this.uniforms.noiseSize=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignetting",{get:function(){return this.uniforms.vignetting},set:function(r){this.uniforms.vignetting=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignettingAlpha",{get:function(){return this.uniforms.vignettingAlpha},set:function(r){this.uniforms.vignettingAlpha=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignettingBlur",{get:function(){return this.uniforms.vignettingBlur},set:function(r){this.uniforms.vignettingBlur=r},enumerable:!1,configurable:!0}),e.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},e})(De);/*! +`;(function(t){Pye(e,t);function e(r){var n=t.call(this,Oye,Rye)||this;return n.time=0,n.seed=0,n.uniforms.dimensions=new Float32Array(2),Object.assign(n,e.defaults,r),n}return e.prototype.apply=function(r,n,i,a){var o=n.filterFrame,s=o.width,u=o.height;this.uniforms.dimensions[0]=s,this.uniforms.dimensions[1]=u,this.uniforms.seed=this.seed,this.uniforms.time=this.time,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"curvature",{get:function(){return this.uniforms.curvature},set:function(r){this.uniforms.curvature=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineWidth",{get:function(){return this.uniforms.lineWidth},set:function(r){this.uniforms.lineWidth=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineContrast",{get:function(){return this.uniforms.lineContrast},set:function(r){this.uniforms.lineContrast=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalLine",{get:function(){return this.uniforms.verticalLine},set:function(r){this.uniforms.verticalLine=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.noise},set:function(r){this.uniforms.noise=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"noiseSize",{get:function(){return this.uniforms.noiseSize},set:function(r){this.uniforms.noiseSize=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignetting",{get:function(){return this.uniforms.vignetting},set:function(r){this.uniforms.vignetting=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignettingAlpha",{get:function(){return this.uniforms.vignettingAlpha},set:function(r){this.uniforms.vignettingAlpha=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vignettingBlur",{get:function(){return this.uniforms.vignettingBlur},set:function(r){this.uniforms.vignettingBlur=r},enumerable:!1,configurable:!0}),e.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},e})(De);/*! * @pixi/filter-drop-shadow - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -3086,7 +3086,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Lx=function(t,e){return Lx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Lx(t,e)};function Rye(t,e){Lx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Cp=function(){return Cp=Object.assign||function(e){for(var r=arguments,n,i=1,a=arguments.length;i>0)+1},Object.defineProperty(e.prototype,"offset",{get:function(){return this.uniforms.uOffset},set:function(r){this.uniforms.uOffset=r},enumerable:!1,configurable:!0}),e})(De);/*! +`;(function(t){Uye(e,t);function e(r,n,i){r===void 0&&(r=[0,0]),n===void 0&&(n=5),i===void 0&&(i=0);var a=t.call(this,$ye,Vye)||this;return a.kernelSize=5,a.uniforms.uVelocity=new Float32Array(2),a._velocity=new ro(a.velocityChanged,a),a.setVelocity(r),a.kernelSize=n,a.offset=i,a}return e.prototype.apply=function(r,n,i,a){var o=this.velocity,s=o.x,u=o.y;this.uniforms.uKernelSize=s!==0||u!==0?this.kernelSize:0,r.applyFilter(this,n,i,a)},Object.defineProperty(e.prototype,"velocity",{get:function(){return this._velocity},set:function(r){this.setVelocity(r)},enumerable:!1,configurable:!0}),e.prototype.setVelocity=function(r){if(Array.isArray(r)){var n=r[0],i=r[1];this._velocity.set(n,i)}else this._velocity.copyFrom(r)},e.prototype.velocityChanged=function(){this.uniforms.uVelocity[0]=this._velocity.x,this.uniforms.uVelocity[1]=this._velocity.y,this.padding=(Math.max(Math.abs(this._velocity.x),Math.abs(this._velocity.y))>>0)+1},Object.defineProperty(e.prototype,"offset",{get:function(){return this.uniforms.uOffset},set:function(r){this.uniforms.uOffset=r},enumerable:!1,configurable:!0}),e})(De);/*! * @pixi/filter-multi-color-replace - v4.2.0 * Compiled Fri, 05 Aug 2022 19:53:35 UTC * @@ -3355,7 +3355,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Ux=function(t,e){return Ux=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ux(t,e)};function Vye(t,e){Ux(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Gye=`attribute vec2 aVertexPosition; +***************************************************************************** */var $x=function(t,e){return $x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},$x(t,e)};function Gye(t,e){$x(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Xye=`attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; @@ -3366,7 +3366,7 @@ void main(void) { gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0); vTextureCoord = aTextureCoord; -}`,Xye=`varying vec2 vTextureCoord; +}`,zye=`varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform float epsilon; @@ -3404,7 +3404,7 @@ void main(void) } } } -`;(function(t){Vye(e,t);function e(r,n,i){n===void 0&&(n=.05),i===void 0&&(i=r.length);var a=t.call(this,Gye,Xye.replace(/%maxColors%/g,i.toFixed(0)))||this;return a._replacements=[],a._maxColors=0,a.epsilon=n,a._maxColors=i,a.uniforms.originalColors=new Float32Array(i*3),a.uniforms.targetColors=new Float32Array(i*3),a.replacements=r,a}return Object.defineProperty(e.prototype,"replacements",{get:function(){return this._replacements},set:function(r){var n=this.uniforms.originalColors,i=this.uniforms.targetColors,a=r.length;if(a>this._maxColors)throw new Error("Length of replacements ("+a+") exceeds the maximum colors length ("+this._maxColors+")");n[a*3]=-1;for(var o=0;othis._maxColors)throw new Error("Length of replacements ("+a+") exceeds the maximum colors length ("+this._maxColors+")");n[a*3]=-1;for(var o=0;oa===n);this.filters&&(this.filters.splice(i,1),this.containerFilters.delete(r))}}get blur(){return this.getOrCreateBlurFilter().blur}set blur(r){this.getOrCreateBlurFilter().blur=r}get x(){var n;return(((n=super.position)==null?void 0:n.x)??0)-this.baseX}set x(r){super.position&&(super.position.x=r+this.baseX)}get y(){var n;return(((n=super.position)==null?void 0:n.y)??0)-this.baseY}set y(r){super.position&&(super.position.y=r+this.baseY)}setBaseX(r){const n=this.x;this.baseX=r,this.x=n}setBaseY(r){const n=this.y;this.baseY=r,this.y=n}getOrCreateBlurFilter(){const r=this.containerFilters.get("blur");if(r)return r;{const n=new mx.BlurFilter;return n.blur=0,this.addFilter(n),this.containerFilters.set("blur",n),n}}getOrCreateOldFilmFilter(r=!0){const n=this.containerFilters.get("oldFilm");if(n)return n;if(r){const i=new Ege;return this.addFilter(i),this.containerFilters.set("oldFilm",i),i}else return null}get oldFilm(){return this.getOrCreateOldFilmFilter(!1)?1:0}set oldFilm(r){r===0?this.removeFilter("oldFilm"):this.getOrCreateOldFilmFilter()}getOrCreateDotFilter(r=!0){const n=this.containerFilters.get("dotFilm");if(n)return n;if(r){const i=new Pge;return this.addFilter(i),this.containerFilters.set("dotFilm",i),i}else return null}get dotFilm(){return this.getOrCreateDotFilter(!1)?1:0}set dotFilm(r){r===0?this.removeFilter("dotFilm"):this.getOrCreateDotFilter()}getOrCreateReflectionFilter(r=!0){const n=this.containerFilters.get("reflectionFilm");if(n)return n;if(r){const i=new kge;return this.addFilter(i),this.containerFilters.set("reflectionFilm",i),i}else return null}get reflectionFilm(){return this.getOrCreateReflectionFilter(!1)?1:0}set reflectionFilm(r){r===0?this.removeFilter("reflectionFilm"):this.getOrCreateReflectionFilter()}getOrCreateGlitchFilter(r=!0){const n=this.containerFilters.get("glitchFilm");if(n)return n;if(r){const i=new Lge;return this.addFilter(i),this.containerFilters.set("glitchFilm",i),i}else return null}get glitchFilm(){return this.getOrCreateGlitchFilter(!1)?1:0}set glitchFilm(r){r===0?this.removeFilter("glitchFilm"):this.getOrCreateGlitchFilter()}getOrCreateRGBSplitFilter(r=!0){const n=this.containerFilters.get("rgbFilm");if(n)return n;if(r){const i=new Uge;return this.addFilter(i),this.containerFilters.set("rgbFilm",i),i}}get rgbFilm(){return this.getOrCreateRGBSplitFilter(!1)?1:0}set rgbFilm(r){r===0?this.removeFilter("rgbFilm"):this.getOrCreateRGBSplitFilter()}getOrCreateGodrayFilter(r=!0){const n=this.containerFilters.get("godrayFilm");if(n)return n;if(r){const i=new zge;return this.addFilter(i),this.containerFilters.set("godrayFilm",i),i}}get godrayFilm(){return this.getOrCreateGodrayFilter(!1)?1:0}set godrayFilm(r){r===0?this.removeFilter("godrayFilm"):this.getOrCreateGodrayFilter()}getOrCreateShockwaveFilter(r=!0){return y0e(this,r)}get shockwaveFilter(){return _0e(this)}set shockwaveFilter(r){x0e(this,r)}getOrCreateRadiusAlphaFilter(r=!0){return S0e(this,r)}get radiusAlphaFilter(){return w0e(this)}set radiusAlphaFilter(r){E0e(this,r)}}var $e;(function(t){t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping"})($e||($e={}));var Pp=function(){function t(e,r,n,i){r===void 0&&(r=new Array),n===void 0&&(n=0),i===void 0&&(i=new DataView(e.buffer)),this.strings=r,this.index=n,this.buffer=i}return t.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},t.prototype.readUnsignedByte=function(){return this.buffer.getUint8(this.index++)},t.prototype.readShort=function(){var e=this.buffer.getInt16(this.index);return this.index+=2,e},t.prototype.readInt32=function(){var e=this.buffer.getInt32(this.index);return this.index+=4,e},t.prototype.readInt=function(e){var r=this.readByte(),n=r&127;return r&128&&(r=this.readByte(),n|=(r&127)<<7,r&128&&(r=this.readByte(),n|=(r&127)<<14,r&128&&(r=this.readByte(),n|=(r&127)<<21,r&128&&(r=this.readByte(),n|=(r&127)<<28)))),e?n:n>>>1^-(n&1)},t.prototype.readStringRef=function(){var e=this.readInt(!0);return e==0?null:this.strings[e-1]},t.prototype.readString=function(){var e=this.readInt(!0);switch(e){case 0:return null;case 1:return""}e--;for(var r="",n=0;n>4){case 12:case 13:r+=String.fromCharCode((i&31)<<6|this.readByte()&63),n+=2;break;case 14:r+=String.fromCharCode((i&15)<<12|(this.readByte()&63)<<6|this.readByte()&63),n+=3;break;default:r+=String.fromCharCode(i),n++}}return r},t.prototype.readFloat=function(){var e=this.buffer.getFloat32(this.index);return this.index+=4,e},t.prototype.readBoolean=function(){return this.readByte()!=0},t}(),R;(function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"})(R||(R={}));var je;(function(t){t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut"})(je||(je={}));var Mt;(function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"})(Mt||(Mt={}));var zt;(function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"})(zt||(zt={}));var Fe;(function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"})(Fe||(Fe={}));/*! ***************************************************************************** + `;super(null,n),this.uniforms.center=[e.x,e.y],this.uniforms.radius=r}set center(e){this.uniforms.center=[e.x,e.y]}get center(){return new We(this.uniforms.center[0],this.uniforms.center[1])}set radius(e){this.uniforms.radius=e}get radius(){return this.uniforms.radius}}function w0e(t,e){const r=t.containerFilters.get(Qx);if(r)return r;if(e){const n=new S0e(new We(.5,.5),Zx);return n.radius=Zx,t.addFilter(n),t.containerFilters.set(Qx,n),n}}function E0e(t){return t.getOrCreateShockwaveFilter(!1)?t.getOrCreateRadiusAlphaFilter().radius:Zx}function T0e(t,e){if(e===0)t.removeFilter(Qx);else{const r=t.getOrCreateRadiusAlphaFilter();r&&(r.radius=e)}}class Hh extends gr{constructor(){super();Ae(this,"containerFilters",new Map);Ae(this,"baseX",0);Ae(this,"baseY",0);Ae(this,"alphaFilter",new gx.AlphaFilter(1));this.addFilter(this.alphaFilter)}get alphaFilterVal(){return this.alphaFilter.alpha}set alphaFilterVal(r){this.alphaFilter.alpha=r}addFilter(r){this.filters?this.filters.push(r):this.filters=[r]}removeFilter(r){const n=this.containerFilters.get(r);if(n){const i=((this==null?void 0:this.filters)??[]).findIndex(a=>a===n);this.filters&&(this.filters.splice(i,1),this.containerFilters.delete(r))}}get blur(){return this.getOrCreateBlurFilter().blur}set blur(r){this.getOrCreateBlurFilter().blur=r}get x(){var n;return(((n=super.position)==null?void 0:n.x)??0)-this.baseX}set x(r){super.position&&(super.position.x=r+this.baseX)}get y(){var n;return(((n=super.position)==null?void 0:n.y)??0)-this.baseY}set y(r){super.position&&(super.position.y=r+this.baseY)}setBaseX(r){const n=this.x;this.baseX=r,this.x=n}setBaseY(r){const n=this.y;this.baseY=r,this.y=n}getOrCreateBlurFilter(){const r=this.containerFilters.get("blur");if(r)return r;{const n=new gx.BlurFilter;return n.blur=0,this.addFilter(n),this.containerFilters.set("blur",n),n}}getOrCreateOldFilmFilter(r=!0){const n=this.containerFilters.get("oldFilm");if(n)return n;if(r){const i=new Tge;return this.addFilter(i),this.containerFilters.set("oldFilm",i),i}else return null}get oldFilm(){return this.getOrCreateOldFilmFilter(!1)?1:0}set oldFilm(r){r===0?this.removeFilter("oldFilm"):this.getOrCreateOldFilmFilter()}getOrCreateDotFilter(r=!0){const n=this.containerFilters.get("dotFilm");if(n)return n;if(r){const i=new Oge;return this.addFilter(i),this.containerFilters.set("dotFilm",i),i}else return null}get dotFilm(){return this.getOrCreateDotFilter(!1)?1:0}set dotFilm(r){r===0?this.removeFilter("dotFilm"):this.getOrCreateDotFilter()}getOrCreateReflectionFilter(r=!0){const n=this.containerFilters.get("reflectionFilm");if(n)return n;if(r){const i=new Mge;return this.addFilter(i),this.containerFilters.set("reflectionFilm",i),i}else return null}get reflectionFilm(){return this.getOrCreateReflectionFilter(!1)?1:0}set reflectionFilm(r){r===0?this.removeFilter("reflectionFilm"):this.getOrCreateReflectionFilter()}getOrCreateGlitchFilter(r=!0){const n=this.containerFilters.get("glitchFilm");if(n)return n;if(r){const i=new Dge;return this.addFilter(i),this.containerFilters.set("glitchFilm",i),i}else return null}get glitchFilm(){return this.getOrCreateGlitchFilter(!1)?1:0}set glitchFilm(r){r===0?this.removeFilter("glitchFilm"):this.getOrCreateGlitchFilter()}getOrCreateRGBSplitFilter(r=!0){const n=this.containerFilters.get("rgbFilm");if(n)return n;if(r){const i=new $ge;return this.addFilter(i),this.containerFilters.set("rgbFilm",i),i}}get rgbFilm(){return this.getOrCreateRGBSplitFilter(!1)?1:0}set rgbFilm(r){r===0?this.removeFilter("rgbFilm"):this.getOrCreateRGBSplitFilter()}getOrCreateGodrayFilter(r=!0){const n=this.containerFilters.get("godrayFilm");if(n)return n;if(r){const i=new Wge;return this.addFilter(i),this.containerFilters.set("godrayFilm",i),i}}get godrayFilm(){return this.getOrCreateGodrayFilter(!1)?1:0}set godrayFilm(r){r===0?this.removeFilter("godrayFilm"):this.getOrCreateGodrayFilter()}getOrCreateShockwaveFilter(r=!0){return _0e(this,r)}get shockwaveFilter(){return x0e(this)}set shockwaveFilter(r){b0e(this,r)}getOrCreateRadiusAlphaFilter(r=!0){return w0e(this,r)}get radiusAlphaFilter(){return E0e(this)}set radiusAlphaFilter(r){T0e(this,r)}}var $e;(function(t){t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping"})($e||($e={}));var Pp=function(){function t(e,r,n,i){r===void 0&&(r=new Array),n===void 0&&(n=0),i===void 0&&(i=new DataView(e.buffer)),this.strings=r,this.index=n,this.buffer=i}return t.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},t.prototype.readUnsignedByte=function(){return this.buffer.getUint8(this.index++)},t.prototype.readShort=function(){var e=this.buffer.getInt16(this.index);return this.index+=2,e},t.prototype.readInt32=function(){var e=this.buffer.getInt32(this.index);return this.index+=4,e},t.prototype.readInt=function(e){var r=this.readByte(),n=r&127;return r&128&&(r=this.readByte(),n|=(r&127)<<7,r&128&&(r=this.readByte(),n|=(r&127)<<14,r&128&&(r=this.readByte(),n|=(r&127)<<21,r&128&&(r=this.readByte(),n|=(r&127)<<28)))),e?n:n>>>1^-(n&1)},t.prototype.readStringRef=function(){var e=this.readInt(!0);return e==0?null:this.strings[e-1]},t.prototype.readString=function(){var e=this.readInt(!0);switch(e){case 0:return null;case 1:return""}e--;for(var r="",n=0;n>4){case 12:case 13:r+=String.fromCharCode((i&31)<<6|this.readByte()&63),n+=2;break;case 14:r+=String.fromCharCode((i&15)<<12|(this.readByte()&63)<<6|this.readByte()&63),n+=3;break;default:r+=String.fromCharCode(i),n++}}return r},t.prototype.readFloat=function(){var e=this.buffer.getFloat32(this.index);return this.index+=4,e},t.prototype.readBoolean=function(){return this.readByte()!=0},t}(),R;(function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"})(R||(R={}));var je;(function(t){t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut"})(je||(je={}));var Mt;(function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"})(Mt||(Mt={}));var Wt;(function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"})(Wt||(Wt={}));var Fe;(function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"})(Fe||(Fe={}));/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -4082,7 +4082,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Qx=function(t,e){return Qx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Qx(t,e)};function Su(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Qx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function fO(t){switch(t.toLowerCase()){case"nearest":return cn.Nearest;case"linear":return cn.Linear;case"mipmap":return cn.MipMap;case"mipmapnearestnearest":return cn.MipMapNearestNearest;case"mipmaplinearnearest":return cn.MipMapLinearNearest;case"mipmapnearestlinear":return cn.MipMapNearestLinear;case"mipmaplinearlinear":return cn.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}}var cn;(function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"})(cn||(cn={}));var no;(function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"})(no||(no={}));var Jx=function(){function t(){this.size=null,this.names=null,this.values=null,this.renderObject=null}return Object.defineProperty(t.prototype,"width",{get:function(){var e=this.texture;return e.trim?e.trim.width:e.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var e=this.texture;return e.trim?e.trim.height:e.orig.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"u",{get:function(){return this.texture._uvs.x0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"v",{get:function(){return this.texture._uvs.y0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"u2",{get:function(){return this.texture._uvs.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"v2",{get:function(){return this.texture._uvs.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetX",{get:function(){var e=this.texture;return e.trim?e.trim.x:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return this.spineOffsetY},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixiOffsetY",{get:function(){var e=this.texture;return e.trim?e.trim.y:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spineOffsetY",{get:function(){var e=this.texture;return this.originalHeight-this.height-(e.trim?e.trim.y:0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalWidth",{get:function(){return this.texture.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalHeight",{get:function(){return this.texture.orig.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.texture.frame.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.texture.frame.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this.texture.rotate!==0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"degrees",{get:function(){return(360-this.texture.rotate*45)%360},enumerable:!1,configurable:!0}),t}(),T0e=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.rotate=0,this.index=0}return t}(),A0e=function(){function t(e,r,n){this.pages=new Array,this.regions=new Array,e&&this.addSpineAtlas(e,r,n)}return t.prototype.addTexture=function(e,r){for(var n=this.pages,i=null,a=0;a=this.lines.length?null:this.lines[this.index++]},t.prototype.readEntry=function(e,r){if(r==null||(r=r.trim(),r.length==0))return 0;var n=r.indexOf(":");if(n==-1)return 0;e[0]=r.substr(0,n).trim();for(var i=1,a=n+1;;i++){var o=r.indexOf(",",a);if(o==-1)return e[i]=r.substr(a).trim(),i;if(e[i]=r.substr(a,o-a).trim(),a=o+1,i==4)return 4}},t}(),hO=function(){function t(){this.minFilter=cn.Nearest,this.magFilter=cn.Nearest,this.uWrap=no.ClampToEdge,this.vWrap=no.ClampToEdge}return t.prototype.setFilters=function(){var e=this.baseTexture,r=this.minFilter;r==cn.Linear?e.scaleMode=Ir.LINEAR:this.minFilter==cn.Nearest?e.scaleMode=Ir.NEAREST:(e.mipmap=mn.POW2,r==cn.MipMapNearestNearest?e.scaleMode=Ir.NEAREST:e.scaleMode=Ir.LINEAR)},t}(),dO=function(t){Su(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Jx),P0e=function(t){return function(e){return t[0]=e,t[0]}}(new Float32Array(1)),O0e=Math.fround||P0e,HD=function(){function t(){this.array=new Array}return t.prototype.add=function(e){var r=this.contains(e);return this.array[e|0]=e|0,!r},t.prototype.contains=function(e){return this.array[e|0]!=null},t.prototype.remove=function(e){this.array[e|0]=void 0},t.prototype.clear=function(){this.array.length=0},t}(),qD=function(){function t(){this.entries={},this.size=0}return t.prototype.add=function(e){var r=this.entries[e];return this.entries[e]=!0,r?!1:(this.size++,!0)},t.prototype.addAll=function(e){for(var r=this.size,n=0,i=e.length;n1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.rgba8888ToColor=function(e,r){e.r=((r&4278190080)>>>24)/255,e.g=((r&16711680)>>>16)/255,e.b=((r&65280)>>>8)/255,e.a=(r&255)/255},t.rgb888ToColor=function(e,r){e.r=((r&16711680)>>>16)/255,e.g=((r&65280)>>>8)/255,e.b=(r&255)/255},t.fromString=function(e){return new t().setFromString(e)},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}(),N=function(){function t(){}return t.clamp=function(e,r,n){return en?n:e},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(e){return e>0?1:e<0?-1:0},t.toInt=function(e){return e>0?Math.floor(e):Math.ceil(e)},t.cbrt=function(e){var r=Math.pow(Math.abs(e),.3333333333333333);return e<0?-r:r},t.randomTriangular=function(e,r){return t.randomTriangularWith(e,r,(e+r)*.5)},t.randomTriangularWith=function(e,r,n){var i=Math.random(),a=r-e;return i<=(n-e)/a?e+Math.sqrt(i*a*(n-e)):r-Math.sqrt((1-i)*a*(r-n))},t.isPowerOfTwo=function(e){return e&&(e&e-1)===0},t.PI=3.1415927,t.PI2=t.PI*2,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}(),R0e=function(){function t(){}return t.prototype.apply=function(e,r,n){return e+(r-e)*this.applyInternal(n)},t}(),I0e=function(t){Su(e,t);function e(r){var n=t.call(this)||this;return n.power=2,n.power=r,n}return e.prototype.applyInternal=function(r){return r<=.5?Math.pow(r*2,this.power)/2:Math.pow((r-1)*2,this.power)/(this.power%2==0?-2:2)+1},e}(R0e),KD=function(t){Su(e,t);function e(r){return t.call(this,r)||this}return e.prototype.applyInternal=function(r){return Math.pow(r-1,this.power)*(this.power%2==0?-1:1)+1},e}(I0e),q=function(){function t(){}return t.arrayCopy=function(e,r,n,i,a){for(var o=r,s=i;o=r?e:t.setArraySize(e,r,n)},t.newArray=function(e,r){for(var n=new Array(e),i=0;i0?this.items.pop():this.instantiator()},t.prototype.free=function(e){e.reset&&e.reset(),this.items.push(e)},t.prototype.freeAll=function(e){for(var r=0;r=this.minX&&e<=this.maxX&&r>=this.minY&&r<=this.maxY},t.prototype.aabbIntersectsSegment=function(e,r,n,i){var a=this.minX,o=this.minY,s=this.maxX,u=this.maxY;if(e<=a&&n<=a||r<=o&&i<=o||e>=s&&n>=s||r>=u&&i>=u)return!1;var l=(i-r)/(n-e),c=l*(a-e)+r;if(c>o&&co&&ca&&fa&&fe.minX&&this.minYe.minY},t.prototype.containsPoint=function(e,r){for(var n=this.polygons,i=0,a=n.length;i=n||c=n){var f=i[u];f+(n-l)/(c-l)*(i[o]-f)=f&&x<=p||x>=p&&x<=f)&&(x>=r&&x<=i||x>=i&&x<=r)){var b=(c*y-l*g)/_;if((b>=h&&b<=v||b>=v&&b<=h)&&(b>=n&&b<=a||b>=a&&b<=n))return!0}f=p,h=v}return!1},t.prototype.getPolygon=function(e){if(!e)throw new Error("boundingBox cannot be null.");var r=this.boundingBoxes.indexOf(e);return r==-1?null:this.polygons[r]},t.prototype.getWidth=function(){return this.maxX-this.minX},t.prototype.getHeight=function(){return this.maxY-this.minY},t}(),k0e={yDown:!0,FAIL_ON_NON_EXISTING_SKIN:!1,GLOBAL_AUTO_UPDATE:!0,GLOBAL_DELAY_LIMIT:0},Ga=[0,0,0],M0e=function(t){Su(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.region=null,r.attachment=null,r}return e}(_i),F0e=function(t){Su(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i,a,o)||this;return s.region=null,s.attachment=null,s}return e}(XD),Zf=function(t){Su(e,t);function e(r){var n=t.call(this)||this;if(!r)throw new Error("The spineData param is required.");if(typeof r=="string")throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');n.spineData=r,n.createSkeleton(r),n.slotContainers=[],n.tempClipContainers=[];for(var i=0,a=n.skeleton.slots.length;ii&&(r=i),this.state.update(r),this.state.apply(this.skeleton),!!this.skeleton){this.skeleton.updateWorldTransform();var a=this.skeleton.slots,o=this.color,s=null,u=null;o?(s=o.light,u=o.dark):s=this.tintRgb;for(var l=0,c=a.length;l0&&(h=h.substr(0,d)),h=h.substr(0,h.lastIndexOf("."))+f,u.spineAtlasFile&&(h=u.spineAtlasFile),h=h.replace(this.baseUrl,"");var p={crossOrigin:r.crossOrigin,xhrType:mt.XHR_RESPONSE_TYPE.TEXT,metadata:u.spineMetadata||null,parentResource:r},v={crossOrigin:r.crossOrigin,metadata:u.imageMetadata||null,parentResource:r},g=r.url.substr(0,r.url.lastIndexOf("/")+1);g=g.replace(this.baseUrl,"");var m=u.imageNamePrefix||r.name+"_atlas_page_",y=u.images?pO(u.images):u.image?pO({default:u.image}):u.imageLoader?u.imageLoader(this,m,g,v):B0e(this,m,g,v);function _(x){new A0e(x,y,function(b){b&&e.parseData(r,o,b,s),n()})}u.atlasRawData?_(u.atlasRawData):this.add(r.name+"_atlas",h,p,function(x){x.error?n():_(x.data)})}}},t}();function B0e(t,e,r,n){return r&&r.lastIndexOf("/")!==r.length-1&&(r+="/"),function(i,a){var o=e+i,s=r+i,u=t.resources[o];if(u){var l=function(){a(u.texture.baseTexture)};u.texture?l():u.onAfterMiddleware.add(l)}else t.add(o,s,n,function(c){c.error?a(null):(i.indexOf("-pma.")>=0&&(c.texture.baseTexture.alphaMode=Rn.PMA),a(c.texture.baseTexture))})}}function pO(t){return function(e,r){var n=t[e]||t.default;n&&n.baseTexture?r(n.baseTexture):r(n)}}/*! ***************************************************************************** +***************************************************************************** */var Jx=function(t,e){return Jx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Jx(t,e)};function Su(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Jx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function hO(t){switch(t.toLowerCase()){case"nearest":return cn.Nearest;case"linear":return cn.Linear;case"mipmap":return cn.MipMap;case"mipmapnearestnearest":return cn.MipMapNearestNearest;case"mipmaplinearnearest":return cn.MipMapLinearNearest;case"mipmapnearestlinear":return cn.MipMapNearestLinear;case"mipmaplinearlinear":return cn.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}}var cn;(function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"})(cn||(cn={}));var no;(function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"})(no||(no={}));var e1=function(){function t(){this.size=null,this.names=null,this.values=null,this.renderObject=null}return Object.defineProperty(t.prototype,"width",{get:function(){var e=this.texture;return e.trim?e.trim.width:e.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var e=this.texture;return e.trim?e.trim.height:e.orig.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"u",{get:function(){return this.texture._uvs.x0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"v",{get:function(){return this.texture._uvs.y0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"u2",{get:function(){return this.texture._uvs.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"v2",{get:function(){return this.texture._uvs.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetX",{get:function(){var e=this.texture;return e.trim?e.trim.x:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return this.spineOffsetY},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixiOffsetY",{get:function(){var e=this.texture;return e.trim?e.trim.y:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spineOffsetY",{get:function(){var e=this.texture;return this.originalHeight-this.height-(e.trim?e.trim.y:0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalWidth",{get:function(){return this.texture.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalHeight",{get:function(){return this.texture.orig.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.texture.frame.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.texture.frame.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this.texture.rotate!==0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"degrees",{get:function(){return(360-this.texture.rotate*45)%360},enumerable:!1,configurable:!0}),t}(),A0e=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.rotate=0,this.index=0}return t}(),C0e=function(){function t(e,r,n){this.pages=new Array,this.regions=new Array,e&&this.addSpineAtlas(e,r,n)}return t.prototype.addTexture=function(e,r){for(var n=this.pages,i=null,a=0;a=this.lines.length?null:this.lines[this.index++]},t.prototype.readEntry=function(e,r){if(r==null||(r=r.trim(),r.length==0))return 0;var n=r.indexOf(":");if(n==-1)return 0;e[0]=r.substr(0,n).trim();for(var i=1,a=n+1;;i++){var o=r.indexOf(",",a);if(o==-1)return e[i]=r.substr(a).trim(),i;if(e[i]=r.substr(a,o-a).trim(),a=o+1,i==4)return 4}},t}(),dO=function(){function t(){this.minFilter=cn.Nearest,this.magFilter=cn.Nearest,this.uWrap=no.ClampToEdge,this.vWrap=no.ClampToEdge}return t.prototype.setFilters=function(){var e=this.baseTexture,r=this.minFilter;r==cn.Linear?e.scaleMode=Ir.LINEAR:this.minFilter==cn.Nearest?e.scaleMode=Ir.NEAREST:(e.mipmap=mn.POW2,r==cn.MipMapNearestNearest?e.scaleMode=Ir.NEAREST:e.scaleMode=Ir.LINEAR)},t}(),pO=function(t){Su(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e1),O0e=function(t){return function(e){return t[0]=e,t[0]}}(new Float32Array(1)),R0e=Math.fround||O0e,qD=function(){function t(){this.array=new Array}return t.prototype.add=function(e){var r=this.contains(e);return this.array[e|0]=e|0,!r},t.prototype.contains=function(e){return this.array[e|0]!=null},t.prototype.remove=function(e){this.array[e|0]=void 0},t.prototype.clear=function(){this.array.length=0},t}(),KD=function(){function t(){this.entries={},this.size=0}return t.prototype.add=function(e){var r=this.entries[e];return this.entries[e]=!0,r?!1:(this.size++,!0)},t.prototype.addAll=function(e){for(var r=this.size,n=0,i=e.length;n1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.rgba8888ToColor=function(e,r){e.r=((r&4278190080)>>>24)/255,e.g=((r&16711680)>>>16)/255,e.b=((r&65280)>>>8)/255,e.a=(r&255)/255},t.rgb888ToColor=function(e,r){e.r=((r&16711680)>>>16)/255,e.g=((r&65280)>>>8)/255,e.b=(r&255)/255},t.fromString=function(e){return new t().setFromString(e)},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}(),N=function(){function t(){}return t.clamp=function(e,r,n){return en?n:e},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(e){return e>0?1:e<0?-1:0},t.toInt=function(e){return e>0?Math.floor(e):Math.ceil(e)},t.cbrt=function(e){var r=Math.pow(Math.abs(e),.3333333333333333);return e<0?-r:r},t.randomTriangular=function(e,r){return t.randomTriangularWith(e,r,(e+r)*.5)},t.randomTriangularWith=function(e,r,n){var i=Math.random(),a=r-e;return i<=(n-e)/a?e+Math.sqrt(i*a*(n-e)):r-Math.sqrt((1-i)*a*(r-n))},t.isPowerOfTwo=function(e){return e&&(e&e-1)===0},t.PI=3.1415927,t.PI2=t.PI*2,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}(),I0e=function(){function t(){}return t.prototype.apply=function(e,r,n){return e+(r-e)*this.applyInternal(n)},t}(),k0e=function(t){Su(e,t);function e(r){var n=t.call(this)||this;return n.power=2,n.power=r,n}return e.prototype.applyInternal=function(r){return r<=.5?Math.pow(r*2,this.power)/2:Math.pow((r-1)*2,this.power)/(this.power%2==0?-2:2)+1},e}(I0e),ZD=function(t){Su(e,t);function e(r){return t.call(this,r)||this}return e.prototype.applyInternal=function(r){return Math.pow(r-1,this.power)*(this.power%2==0?-1:1)+1},e}(k0e),q=function(){function t(){}return t.arrayCopy=function(e,r,n,i,a){for(var o=r,s=i;o=r?e:t.setArraySize(e,r,n)},t.newArray=function(e,r){for(var n=new Array(e),i=0;i0?this.items.pop():this.instantiator()},t.prototype.free=function(e){e.reset&&e.reset(),this.items.push(e)},t.prototype.freeAll=function(e){for(var r=0;r=this.minX&&e<=this.maxX&&r>=this.minY&&r<=this.maxY},t.prototype.aabbIntersectsSegment=function(e,r,n,i){var a=this.minX,o=this.minY,s=this.maxX,u=this.maxY;if(e<=a&&n<=a||r<=o&&i<=o||e>=s&&n>=s||r>=u&&i>=u)return!1;var l=(i-r)/(n-e),c=l*(a-e)+r;if(c>o&&co&&ca&&fa&&fe.minX&&this.minYe.minY},t.prototype.containsPoint=function(e,r){for(var n=this.polygons,i=0,a=n.length;i=n||c=n){var f=i[u];f+(n-l)/(c-l)*(i[o]-f)=f&&x<=p||x>=p&&x<=f)&&(x>=r&&x<=i||x>=i&&x<=r)){var b=(c*y-l*g)/_;if((b>=h&&b<=v||b>=v&&b<=h)&&(b>=n&&b<=a||b>=a&&b<=n))return!0}f=p,h=v}return!1},t.prototype.getPolygon=function(e){if(!e)throw new Error("boundingBox cannot be null.");var r=this.boundingBoxes.indexOf(e);return r==-1?null:this.polygons[r]},t.prototype.getWidth=function(){return this.maxX-this.minX},t.prototype.getHeight=function(){return this.maxY-this.minY},t}(),M0e={yDown:!0,FAIL_ON_NON_EXISTING_SKIN:!1,GLOBAL_AUTO_UPDATE:!0,GLOBAL_DELAY_LIMIT:0},Ga=[0,0,0],F0e=function(t){Su(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.region=null,r.attachment=null,r}return e}(_i),N0e=function(t){Su(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i,a,o)||this;return s.region=null,s.attachment=null,s}return e}(zD),Zf=function(t){Su(e,t);function e(r){var n=t.call(this)||this;if(!r)throw new Error("The spineData param is required.");if(typeof r=="string")throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');n.spineData=r,n.createSkeleton(r),n.slotContainers=[],n.tempClipContainers=[];for(var i=0,a=n.skeleton.slots.length;ii&&(r=i),this.state.update(r),this.state.apply(this.skeleton),!!this.skeleton){this.skeleton.updateWorldTransform();var a=this.skeleton.slots,o=this.color,s=null,u=null;o?(s=o.light,u=o.dark):s=this.tintRgb;for(var l=0,c=a.length;l0&&(h=h.substr(0,d)),h=h.substr(0,h.lastIndexOf("."))+f,u.spineAtlasFile&&(h=u.spineAtlasFile),h=h.replace(this.baseUrl,"");var p={crossOrigin:r.crossOrigin,xhrType:mt.XHR_RESPONSE_TYPE.TEXT,metadata:u.spineMetadata||null,parentResource:r},v={crossOrigin:r.crossOrigin,metadata:u.imageMetadata||null,parentResource:r},g=r.url.substr(0,r.url.lastIndexOf("/")+1);g=g.replace(this.baseUrl,"");var m=u.imageNamePrefix||r.name+"_atlas_page_",y=u.images?vO(u.images):u.image?vO({default:u.image}):u.imageLoader?u.imageLoader(this,m,g,v):j0e(this,m,g,v);function _(x){new C0e(x,y,function(b){b&&e.parseData(r,o,b,s),n()})}u.atlasRawData?_(u.atlasRawData):this.add(r.name+"_atlas",h,p,function(x){x.error?n():_(x.data)})}}},t}();function j0e(t,e,r,n){return r&&r.lastIndexOf("/")!==r.length-1&&(r+="/"),function(i,a){var o=e+i,s=r+i,u=t.resources[o];if(u){var l=function(){a(u.texture.baseTexture)};u.texture?l():u.onAfterMiddleware.add(l)}else t.add(o,s,n,function(c){c.error?a(null):(i.indexOf("-pma.")>=0&&(c.texture.baseTexture.alphaMode=Rn.PMA),a(c.texture.baseTexture))})}}function vO(t){return function(e,r){var n=t[e]||t.default;n&&n.baseTexture?r(n.baseTexture):r(n)}}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -4095,7 +4095,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var e1=function(t,e){return e1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},e1(t,e)};function Nt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");e1(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Mw=function(){function t(e){if(e==null)throw new Error("name cannot be null.");this.name=e}return t}(),Fs=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.id=(e.nextID++&65535)<<11,n.worldVerticesLength=0,n.deformAttachment=n,n}return e.prototype.computeWorldVerticesOld=function(r,n){this.computeWorldVertices(r,0,this.worldVerticesLength,n,0,2)},e.prototype.computeWorldVertices=function(r,n,i,a,o,s){i=o+(i>>1)*s;var u=r.bone.skeleton,l=r.deform,c=this.vertices,f=this.bones;if(f==null){l.length>0&&(c=l);for(var h=r.bone.matrix,d=h.tx,p=h.ty,v=h.a,g=h.c,m=h.b,y=h.d,_=n,x=o;x0&&(r%=this.duration));for(var l=this.timelines,c=0,f=l.length;c>>1;;){if(e[(o+1)*n]<=r?i=o+1:a=o,i==a)return(i+1)*n;o=i+a>>>1}},t.linearSearch=function(e,r,n){for(var i=0,a=e.length-n;i<=a;i+=n)if(e[i]>r)return i;return-1},t}(),Mr;(function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"})(Mr||(Mr={}));var ha=function(){function t(e){if(e<=0)throw new Error("frameCount must be > 0: "+e);this.curves=q.newFloatArray((e-1)*t.BEZIER_SIZE)}return t.prototype.getFrameCount=function(){return this.curves.length/t.BEZIER_SIZE+1},t.prototype.setLinear=function(e){this.curves[e*t.BEZIER_SIZE]=t.LINEAR},t.prototype.setStepped=function(e){this.curves[e*t.BEZIER_SIZE]=t.STEPPED},t.prototype.getCurveType=function(e){var r=e*t.BEZIER_SIZE;if(r==this.curves.length)return t.LINEAR;var n=this.curves[r];return n==t.LINEAR?t.LINEAR:n==t.STEPPED?t.STEPPED:t.BEZIER},t.prototype.setCurve=function(e,r,n,i,a){var o=(-r*2+i)*.03,s=(-n*2+a)*.03,u=((r-i)*3+1)*.006,l=((n-a)*3+1)*.006,c=o*2+u,f=s*2+l,h=r*.3+o+u*.16666667,d=n*.3+s+l*.16666667,p=e*t.BEZIER_SIZE,v=this.curves;v[p++]=t.BEZIER;for(var g=h,m=d,y=p+t.BEZIER_SIZE-1;p=r){var l=void 0,c=void 0;return i==s?(l=0,c=0):(l=n[i-2],c=n[i-1]),c+(n[i+1]-c)*(r-l)/(o-l)}var f=n[i-1];return f+(1-f)*(r-o)/(1-o)},t.LINEAR=0,t.STEPPED=1,t.BEZIER=2,t.BEZIER_SIZE=10*2-1,t}(),Mn=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r<<1),n}return e.prototype.getPropertyId=function(){return(Mr.rotate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i){r<<=1,this.frames[r]=n,this.frames[r+e.ROTATION]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES]){var h=l[l.length+e.PREV_ROTATION];switch(s){case R.setup:c.rotation=c.data.rotation+h*o;break;case R.first:case R.replace:h+=c.data.rotation-c.rotation,h-=(16384-(16384.499999999996-h/360|0))*360;case R.add:c.rotation+=h*o}return}var d=er.binarySearch(l,i,e.ENTRIES),p=l[d+e.PREV_ROTATION],v=l[d],g=this.getCurvePercent((d>>1)-1,1-(i-v)/(l[d+e.PREV_TIME]-v)),m=l[d+e.ROTATION]-p;switch(m=p+(m-(16384-(16384.499999999996-m/360|0))*360)*g,s){case R.setup:c.rotation=c.data.rotation+(m-(16384-(16384.499999999996-m/360|0))*360)*o;break;case R.first:case R.replace:m+=c.data.rotation-c.rotation;case R.add:c.rotation+=(m-(16384-(16384.499999999996-m/360|0))*360)*o}}},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_ROTATION=-1,e.ROTATION=1,e}(ha),Ss=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.translate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.X]=i,this.frames[r+e.Y]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.X]-f)*v,h+=(l[d+e.Y]-h)*v}switch(s){case R.setup:c.x=c.data.x+f*o,c.y=c.data.y+h*o;break;case R.first:case R.replace:c.x+=(c.data.x+f-c.x)*o,c.y+=(c.data.y+h-c.y)*o;break;case R.add:c.x+=f*o,c.y+=h*o}}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_X=-2,e.PREV_Y=-1,e.X=1,e.Y=2,e}(ha),Lw=function(t){Nt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Mr.scale<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X]*c.data.scaleX,h=l[l.length+e.PREV_Y]*c.data.scaleY;else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=(f+(l[d+e.X]-f)*v)*c.data.scaleX,h=(h+(l[d+e.Y]-h)*v)*c.data.scaleY}if(o==1)s==R.add?(c.scaleX+=f-c.data.scaleX,c.scaleY+=h-c.data.scaleY):(c.scaleX=f,c.scaleY=h);else{var g=0,m=0;if(u==je.mixOut)switch(s){case R.setup:g=c.data.scaleX,m=c.data.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.first:case R.replace:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.add:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-c.data.scaleX)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-c.data.scaleY)*o}else switch(s){case R.setup:g=Math.abs(c.data.scaleX)*N.signum(f),m=Math.abs(c.data.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.first:case R.replace:g=Math.abs(c.scaleX)*N.signum(f),m=Math.abs(c.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.add:g=N.signum(f),m=N.signum(h),c.scaleX=Math.abs(c.scaleX)*g+(f-Math.abs(c.data.scaleX)*g)*o,c.scaleY=Math.abs(c.scaleY)*m+(h-Math.abs(c.data.scaleY)*m)*o}}}},e}(Ss),Dw=function(t){Nt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Mr.shear<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=f+(l[d+e.X]-f)*v,h=h+(l[d+e.Y]-h)*v}switch(s){case R.setup:c.shearX=c.data.shearX+f*o,c.shearY=c.data.shearY+h*o;break;case R.first:case R.replace:c.shearX+=(c.data.shearX+f-c.shearX)*o,c.shearY+=(c.data.shearY+h-c.shearY)*o;break;case R.add:c.shearX+=f*o,c.shearY+=h*o}}},e}(Ss),_f=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.color<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=this.frames;if(i=c[c.length-e.ENTRIES]){var m=c.length;d=c[m+e.PREV_R],p=c[m+e.PREV_G],v=c[m+e.PREV_B],g=c[m+e.PREV_A]}else{var y=er.binarySearch(c,i,e.ENTRIES);d=c[y+e.PREV_R],p=c[y+e.PREV_G],v=c[y+e.PREV_B],g=c[y+e.PREV_A];var _=c[y],x=this.getCurvePercent(y/e.ENTRIES-1,1-(i-_)/(c[y+e.PREV_TIME]-_));d+=(c[y+e.R]-d)*x,p+=(c[y+e.G]-p)*x,v+=(c[y+e.B]-v)*x,g+=(c[y+e.A]-g)*x}if(o==1)l.color.set(d,p,v,g);else{var f=l.color;s==R.setup&&f.setFromColor(l.data.color),f.add((d-f.r)*o,(p-f.g)*o,(v-f.b)*o,(g-f.a)*o)}}},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_R=-4,e.PREV_G=-3,e.PREV_B=-2,e.PREV_A=-1,e.R=1,e.G=2,e.B=3,e.A=4,e}(ha),xf=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.twoColor<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s,u,l,c){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s,this.frames[r+e.R2]=u,this.frames[r+e.G2]=l,this.frames[r+e.B2]=c},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=this.frames;if(i=c[c.length-e.ENTRIES]){var S=c.length;v=c[S+e.PREV_R],g=c[S+e.PREV_G],m=c[S+e.PREV_B],y=c[S+e.PREV_A],_=c[S+e.PREV_R2],x=c[S+e.PREV_G2],b=c[S+e.PREV_B2]}else{var w=er.binarySearch(c,i,e.ENTRIES);v=c[w+e.PREV_R],g=c[w+e.PREV_G],m=c[w+e.PREV_B],y=c[w+e.PREV_A],_=c[w+e.PREV_R2],x=c[w+e.PREV_G2],b=c[w+e.PREV_B2];var E=c[w],T=this.getCurvePercent(w/e.ENTRIES-1,1-(i-E)/(c[w+e.PREV_TIME]-E));v+=(c[w+e.R]-v)*T,g+=(c[w+e.G]-g)*T,m+=(c[w+e.B]-m)*T,y+=(c[w+e.A]-y)*T,_+=(c[w+e.R2]-_)*T,x+=(c[w+e.G2]-x)*T,b+=(c[w+e.B2]-b)*T}if(o==1)l.color.set(v,g,m,y),l.darkColor.set(_,x,b,1);else{var f=l.color,h=l.darkColor;s==R.setup&&(f.setFromColor(l.data.color),h.setFromColor(l.data.darkColor)),f.add((v-f.r)*o,(g-f.g)*o,(m-f.b)*o,(y-f.a)*o),h.add((_-h.r)*o,(x-h.g)*o,(b-h.b)*o,0)}}},e.ENTRIES=8,e.PREV_TIME=-8,e.PREV_R=-7,e.PREV_G=-6,e.PREV_B=-5,e.PREV_A=-4,e.PREV_R2=-3,e.PREV_G2=-2,e.PREV_B2=-1,e.R=1,e.G=2,e.B=3,e.A=4,e.R2=5,e.G2=6,e.B2=7,e}(ha),ns=function(){function t(e){this.frames=q.newFloatArray(e),this.attachmentNames=new Array(e)}return t.prototype.getPropertyId=function(){return(Mr.attachment<<24)+this.slotIndex},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.attachmentNames[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.slots[this.slotIndex];if(u.bone.active){if(s==je.mixOut){o==R.setup&&this.setAttachment(e,u,u.data.attachmentName);return}var l=this.frames;if(n=l[l.length-1]?c=l.length-1:c=er.binarySearch(l,n,1)-1;var f=this.attachmentNames[c];e.slots[this.slotIndex].setAttachment(f==null?null:e.getAttachment(this.slotIndex,f))}},t.prototype.setAttachment=function(e,r,n){r.setAttachment(n==null?null:e.getAttachment(this.slotIndex,n))},t}(),vO=null,Bw=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r),n.frameVertices=new Array(r),vO==null&&(vO=q.newFloatArray(64)),n}return e.prototype.getPropertyId=function(){return(Mr.deform<<27)+ +this.attachment.id+this.slotIndex},e.prototype.setFrame=function(r,n,i){this.frames[r]=n,this.frameVertices[r]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.getAttachment();if(!(!(c instanceof Fs)||c.deformAttachment!=this.attachment)){var f=l.deform;f.length==0&&(s=R.setup);var h=this.frameVertices,d=h[0].length,p=this.frames;if(i=p[p.length-1]){var x=h[p.length-1];if(o==1)if(s==R.add){var v=c;if(v.bones==null)for(var m=v.vertices,b=0;bn)this.apply(e,r,Number.MAX_VALUE,i,a,o,s),r=-1;else if(r>=u[l-1])return;if(!(n0&&u[c-1]==f;)c--}for(;c=u[c];c++)i.push(this.events[c])}}},t}(),Ol=function(){function t(e){this.frames=q.newFloatArray(e),this.drawOrders=new Array(e)}return t.prototype.getPropertyId=function(){return Mr.drawOrder<<24},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.drawOrders[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.drawOrder,l=e.slots;if(s==je.mixOut&&o==R.setup){q.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length);return}var c=this.frames;if(n=c[c.length-1]?f=c.length-1:f=er.binarySearch(c,n)-1;var h=this.drawOrders[f];if(h==null)q.arrayCopy(l,0,u,0,l.length);else for(var d=0,p=h.length;d=l[l.length-e.ENTRIES]){s==R.setup?(c.mix=c.data.mix+(l[l.length+e.PREV_MIX]-c.data.mix)*o,c.softness=c.data.softness+(l[l.length+e.PREV_SOFTNESS]-c.data.softness)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0)):(c.mix+=(l[l.length+e.PREV_MIX]-c.mix)*o,c.softness+=(l[l.length+e.PREV_SOFTNESS]-c.softness)*o,u==je.mixIn&&(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0));return}var f=er.binarySearch(l,i,e.ENTRIES),h=l[f+e.PREV_MIX],d=l[f+e.PREV_SOFTNESS],p=l[f],v=this.getCurvePercent(f/e.ENTRIES-1,1-(i-p)/(l[f+e.PREV_TIME]-p));s==R.setup?(c.mix=c.data.mix+(h+(l[f+e.MIX]-h)*v-c.data.mix)*o,c.softness=c.data.softness+(d+(l[f+e.SOFTNESS]-d)*v-c.data.softness)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0)):(c.mix+=(h+(l[f+e.MIX]-h)*v-c.mix)*o,c.softness+=(d+(l[f+e.SOFTNESS]-d)*v-c.softness)*o,u==je.mixIn&&(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0))}},e.ENTRIES=6,e.PREV_TIME=-6,e.PREV_MIX=-5,e.PREV_SOFTNESS=-4,e.PREV_BEND_DIRECTION=-3,e.PREV_COMPRESS=-2,e.PREV_STRETCH=-1,e.MIX=1,e.SOFTNESS=2,e.BEND_DIRECTION=3,e.COMPRESS=4,e.STRETCH=5,e}(ha),Sf=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.transformConstraint<<24)+this.transformConstraintIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a,this.frames[r+e.SCALE]=o,this.frames[r+e.SHEAR]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.transformConstraints[this.transformConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES]){var g=l.length;h=l[g+e.PREV_ROTATE],d=l[g+e.PREV_TRANSLATE],p=l[g+e.PREV_SCALE],v=l[g+e.PREV_SHEAR]}else{var m=er.binarySearch(l,i,e.ENTRIES);h=l[m+e.PREV_ROTATE],d=l[m+e.PREV_TRANSLATE],p=l[m+e.PREV_SCALE],v=l[m+e.PREV_SHEAR];var y=l[m],_=this.getCurvePercent(m/e.ENTRIES-1,1-(i-y)/(l[m+e.PREV_TIME]-y));h+=(l[m+e.ROTATE]-h)*_,d+=(l[m+e.TRANSLATE]-d)*_,p+=(l[m+e.SCALE]-p)*_,v+=(l[m+e.SHEAR]-v)*_}if(s==R.setup){var f=c.data;c.rotateMix=f.rotateMix+(h-f.rotateMix)*o,c.translateMix=f.translateMix+(d-f.translateMix)*o,c.scaleMix=f.scaleMix+(p-f.scaleMix)*o,c.shearMix=f.shearMix+(v-f.shearMix)*o}else c.rotateMix+=(h-c.rotateMix)*o,c.translateMix+=(d-c.translateMix)*o,c.scaleMix+=(p-c.scaleMix)*o,c.shearMix+=(v-c.shearMix)*o}},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_ROTATE=-4,e.PREV_TRANSLATE=-3,e.PREV_SCALE=-2,e.PREV_SHEAR=-1,e.ROTATE=1,e.TRANSLATE=2,e.SCALE=3,e.SHEAR=4,e}(ha),ql=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.pathConstraintPosition<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.VALUE]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=er.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.position=c.data.position+(f-c.data.position)*o:c.position+=(f-c.position)*o}},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_VALUE=-1,e.VALUE=1,e}(ha),jw=function(t){Nt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Mr.pathConstraintSpacing<<24)+this.pathConstraintIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=er.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*o:c.spacing+=(f-c.spacing)*o}},e}(ql),wf=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.pathConstraintMix<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_ROTATE],h=l[l.length+e.PREV_TRANSLATE];else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_ROTATE],h=l[d+e.PREV_TRANSLATE];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.ROTATE]-f)*v,h+=(l[d+e.TRANSLATE]-h)*v}s==R.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*o,c.translateMix=c.data.translateMix+(h-c.data.translateMix)*o):(c.rotateMix+=(f-c.rotateMix)*o,c.translateMix+=(h-c.translateMix)*o)}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_ROTATE=-2,e.PREV_TRANSLATE=-1,e.ROTATE=1,e.TRANSLATE=2,e}(ha),e3=function(){function t(e){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r3(this),this.propertyIDs=new HD,this.animationsChanged=!1,this.trackEntryPool=new hm(function(){return new t3}),this.data=e}return t.prototype.update=function(e){e*=this.timeScale;for(var r=this.tracks,n=0,i=r.length;n0){if(a.delay-=o,a.delay>0)continue;o=-a.delay,a.delay=0}var s=a.next;if(s!=null){var u=a.trackLast-s.delay;if(u>=0){for(s.delay=0,s.trackTime+=a.timeScale==0?0:(u/a.timeScale+e)*s.timeScale,a.trackTime+=o,this.setCurrent(n,s,!0);s.mixingFrom!=null;)s.mixTime+=e,s=s.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&a.mixingFrom==null){r[n]=null,this.queue.end(a),this.disposeNext(a);continue}if(a.mixingFrom!=null&&this.updateMixingFrom(a,e)){var l=a.mixingFrom;for(a.mixingFrom=null,l!=null&&(l.mixingTo=null);l!=null;)this.queue.end(l),l=l.mixingFrom}a.trackTime+=o}}this.queue.drain()},t.prototype.updateMixingFrom=function(e,r){var n=e.mixingFrom;if(n==null)return!0;var i=this.updateMixingFrom(n,r);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.mixTime>0&&e.mixTime>=e.mixDuration?((n.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=n.mixingFrom,n.mixingFrom!=null&&(n.mixingFrom.mixingTo=e),e.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=r*n.timeScale,e.mixTime+=r,!1)},t.prototype.apply=function(e){if(e==null)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,n=this.tracks,i=!1,a=0,o=n.length;a0)){i=!0;var u=a==0?R.first:s.mixBlend,l=s.alpha;s.mixingFrom!=null?l*=this.applyMixingFrom(s,e,u):s.trackTime>=s.trackEnd&&s.next==null&&(l=0);var c=s.animationLast,f=s.getAnimationTime(),h=s.animation.timelines.length,d=s.animation.timelines;if(a==0&&l==1||u==R.add)for(var p=0;p1&&(a=1),n!=R.first&&(n=i.mixBlend));var o=a0&&this.queueEvents(i,c),this.events.length=0,i.nextAnimationLast=c,i.nextTrackLast=i.trackTime,a},t.prototype.applyAttachmentTimeline=function(e,r,n,i,a){var o=r.slots[e.slotIndex];if(o.bone.active){var s=e.frames;if(n=s[s.length-1]?u=s.length-1:u=er.binarySearch(s,n)-1,this.setAttachment(r,o,e.attachmentNames[u],a)}o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+t.SETUP)}},t.prototype.setAttachment=function(e,r,n,i){r.setAttachment(n==null?null:e.getAttachment(r.data.index,n)),i&&(r.attachmentState=this.unkeyedState+t.CURRENT)},t.prototype.applyRotateTimeline=function(e,r,n,i,a,o,s,u){if(u&&(o[s]=0),i==1){e.apply(r,0,n,null,1,a,je.mixIn);return}var l=e,c=l.frames,f=r.bones[l.boneIndex];if(f.active){var h=0,d=0;if(n=c[c.length-Mn.ENTRIES])d=f.data.rotation+c[c.length+Mn.PREV_ROTATION];else{var p=er.binarySearch(c,n,Mn.ENTRIES),v=c[p+Mn.PREV_ROTATION],g=c[p],m=l.getCurvePercent((p>>1)-1,1-(n-g)/(c[p+Mn.PREV_TIME]-g));d=c[p+Mn.ROTATION]-v,d-=(16384-(16384.499999999996-d/360|0))*360,d=v+d*m+f.data.rotation,d-=(16384-(16384.499999999996-d/360|0))*360}var y=0,_=d-h;if(_-=(16384-(16384.499999999996-_/360|0))*360,_==0)y=o[s];else{var x=0,b=0;u?(x=0,b=_):(x=o[s],b=o[s+1]);var S=_>0,w=x>=0;N.signum(b)!=N.signum(_)&&Math.abs(b)<=90&&(Math.abs(x)>180&&(x+=360*N.signum(x)),w=S),y=_+x-x%360,w!=S&&(y+=360*N.signum(x)),o[s]=y}o[s+1]=_,h+=y*i,f.rotation=h-(16384-(16384.499999999996-h/360|0))*360}},t.prototype.queueEvents=function(e,r){for(var n=e.animationStart,i=e.animationEnd,a=i-n,o=e.trackLast%a,s=this.events,u=0,l=s.length;ui||this.queue.event(e,c)}var f=!1;for(e.loop?f=a==0||o>e.trackTime%a:f=r>=i&&e.animationLast=this.tracks.length)){var r=this.tracks[e];if(r!=null){this.queue.end(r),this.disposeNext(r);for(var n=r;;){var i=n.mixingFrom;if(i==null)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[r.trackIndex]=null,this.queue.drain()}}},t.prototype.setCurrent=function(e,r,n){var i=this.expandToIndex(e);this.tracks[e]=r,i!=null&&(n&&this.queue.interrupt(i),r.mixingFrom=i,i.mixingTo=r,r.mixTime=0,i.mixingFrom!=null&&i.mixDuration>0&&(r.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(r)},t.prototype.setAnimation=function(e,r,n){var i=this.data.skeletonData.findAnimation(r);if(i==null)throw new Error("Animation not found: "+r);return this.setAnimationWith(e,i,n)},t.prototype.setAnimationWith=function(e,r,n){if(r==null)throw new Error("animation cannot be null.");var i=!0,a=this.expandToIndex(e);a!=null&&(a.nextTrackLast==-1?(this.tracks[e]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.disposeNext(a),a=a.mixingFrom,i=!1):this.disposeNext(a));var o=this.trackEntry(e,r,n,a);return this.setCurrent(e,o,i),this.queue.drain(),o},t.prototype.addAnimation=function(e,r,n,i){var a=this.data.skeletonData.findAnimation(r);if(a==null)throw new Error("Animation not found: "+r);return this.addAnimationWith(e,a,n,i)},t.prototype.addAnimationWith=function(e,r,n,i){if(r==null)throw new Error("animation cannot be null.");var a=this.expandToIndex(e);if(a!=null)for(;a.next!=null;)a=a.next;var o=this.trackEntry(e,r,n,a);if(a==null)this.setCurrent(e,o,!0),this.queue.drain();else if(a.next=o,i<=0){var s=a.animationEnd-a.animationStart;s!=0?(a.loop?i+=s*(1+(a.trackTime/s|0)):i+=Math.max(s,a.trackTime),i-=this.data.getMix(a.animation,r)):i=a.trackTime}return o.delay=i,o},t.prototype.setEmptyAnimation=function(e,r){var n=this.setAnimationWith(e,t.emptyAnimation,!1);return n.mixDuration=r,n.trackEnd=r,n},t.prototype.addEmptyAnimation=function(e,r,n){n<=0&&(n-=r);var i=this.addAnimationWith(e,t.emptyAnimation,!1,n);return i.mixDuration=r,i.trackEnd=r,i},t.prototype.setEmptyAnimations=function(e){var r=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n0){a[u]=t.HOLD_MIX,o[u]=f;continue e}break}a[u]=t.HOLD_FIRST}}},t.prototype.getCurrent=function(e){return e>=this.tracks.length?null:this.tracks[e]},t.prototype.addListener=function(e){if(e==null)throw new Error("listener cannot be null.");this.listeners.push(e)},t.prototype.removeListener=function(e){var r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)},t.prototype.clearListeners=function(){this.listeners.length=0},t.prototype.clearListenerNotifications=function(){this.queue.clear()},t.prototype.setAnimationByName=function(e,r,n){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(e,r,n)},t.prototype.addAnimationByName=function(e,r,n,i){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(e,r,n,i)},t.prototype.hasAnimation=function(e){var r=this.data.skeletonData.findAnimation(e);return r!==null},t.prototype.hasAnimationByName=function(e){return t.deprecatedWarning3||(t.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(e)},t.emptyAnimation=new er("",[],0),t.SUBSEQUENT=0,t.FIRST=1,t.HOLD_SUBSEQUENT=2,t.HOLD_FIRST=3,t.HOLD_MIX=4,t.SETUP=1,t.CURRENT=2,t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),t3=function(){function t(){this.mixBlend=R.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return t.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},t.prototype.getAnimationTime=function(){if(this.loop){var e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},t.prototype.setAnimationLast=function(e){this.animationLast=e,this.nextAnimationLast=e},t.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},t.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},Object.defineProperty(t.prototype,"time",{get:function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime},set:function(e){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endTime",{get:function(){return t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime},set:function(e){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),t.prototype.loopsCount=function(){return Math.floor(this.trackTime/this.trackEnd)},t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t}(),r3=function(){function t(e){this.objects=[],this.drainDisabled=!1,this.animState=e}return t.prototype.start=function(e){this.objects.push(on.start),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.interrupt=function(e){this.objects.push(on.interrupt),this.objects.push(e)},t.prototype.end=function(e){this.objects.push(on.end),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.dispose=function(e){this.objects.push(on.dispose),this.objects.push(e)},t.prototype.complete=function(e){this.objects.push(on.complete),this.objects.push(e)},t.prototype.event=function(e,r){this.objects.push(on.event),this.objects.push(e),this.objects.push(r)},t.prototype.deprecateStuff=function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'")),!0},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var e=this.objects,r=this.animState.listeners,n=0;n1e-4?(S=Math.abs(p*m-v*g)/S,p/=this.skeleton.scaleX,g/=this.skeleton.scaleY,v=g*S,m=p*S,w=Math.atan2(g,p)*N.radDeg):(p=0,g=0,w=90-Math.atan2(m,v)*N.radDeg);var E=n+o-w,T=n+s-w+90,y=N.cosDeg(E)*i,_=N.cosDeg(T)*a,x=N.sinDeg(E)*i,b=N.sinDeg(T)*a;l.a=p*y-v*x,l.c=p*_-v*b,l.b=g*y+m*x,l.d=g*_+m*b;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,k=(g*A+m*O)/f,S=Math.sqrt(P*P+k*k);S>1e-5&&(S=1/S),P*=S,k*=S,S=Math.sqrt(P*P+k*k),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY>0)&&(S=-S);var M=Math.PI/2+Math.atan2(k,P),B=Math.cos(M)*S,j=Math.sin(M)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,x=N.sinDeg(o)*i,b=N.sinDeg(90+s)*a;l.a=P*y+B*x,l.c=P*_+B*b,l.b=k*y+j*x,l.d=k*_+j*b;break}}l.a*=c,l.c*=c,l.b*=f,l.d*=f},t.prototype.setToSetupPose=function(){var e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY},t.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*N.radDeg},t.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*N.radDeg},t.prototype.getWorldScaleX=function(){var e=this.matrix;return Math.sqrt(e.a*e.a+e.c*e.c)},t.prototype.getWorldScaleY=function(){var e=this.matrix;return Math.sqrt(e.b*e.b+e.d*e.d)},t.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent,r=this.matrix;if(e==null){this.ax=r.tx,this.ay=r.ty,this.arotation=Math.atan2(r.b,r.a)*N.radDeg,this.ascaleX=Math.sqrt(r.a*r.a+r.b*r.b),this.ascaleY=Math.sqrt(r.c*r.c+r.d*r.d),this.ashearX=0,this.ashearY=Math.atan2(r.a*r.c+r.b*r.d,r.a*r.d-r.b*r.c)*N.radDeg;return}var n=e.matrix,i=1/(n.a*n.d-n.b*n.c),a=r.tx-n.tx,o=r.ty-n.ty;this.ax=a*n.d*i-o*n.c*i,this.ay=o*n.a*i-a*n.b*i;var s=i*n.d,u=i*n.a,l=i*n.c,c=i*n.b,f=s*r.a-l*r.b,h=s*r.c-l*r.d,d=u*r.b-c*r.a,p=u*r.d-c*r.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+d*d),this.ascaleX>1e-4){var v=f*p-h*d;this.ascaleY=v/this.ascaleX,this.ashearY=Math.atan2(f*h+d*p,v)*N.radDeg,this.arotation=Math.atan2(d,f)*N.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(h*h+p*p),this.ashearY=0,this.arotation=90-Math.atan2(p,h)*N.radDeg},t.prototype.worldToLocal=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=1/(n*o-i*a),u=e.x-r.tx,l=e.y-r.ty;return e.x=u*o*s-l*i*s,e.y=l*n*s-u*a*s,e},t.prototype.localToWorld=function(e){var r=this.matrix,n=e.x,i=e.y;return e.x=n*r.a+i*r.c+r.tx,e.y=n*r.b+i*r.d+r.ty,e},t.prototype.worldToLocalRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(i.a*r-i.b*n,i.d*n-i.c*r)*N.radDeg},t.prototype.localToWorldRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(n*i.b+r*i.d,n*i.a+r*i.c)*N.radDeg},t.prototype.rotateWorld=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=N.cosDeg(e),u=N.sinDeg(e);r.a=s*n-u*a,r.c=s*i-u*o,r.b=u*n+s*a,r.d=u*i+s*o,this.appliedValid=!1},t}(),$w=function(){function t(e,r,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=Fe.Normal,this.skinRequired=!1,this.color=new de,e<0)throw new Error("index must be >= 0.");if(r==null)throw new Error("name cannot be null.");this.index=e,this.name=r,this.parent=n}return t}(),vm=function(){function t(e,r,n){this.name=e,this.order=r,this.skinRequired=n}return t}(),Vw=function(){function t(e,r){if(r==null)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),Gw=function(){function t(e){this.name=e}return t}(),i3=function(){function t(e,r){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.mix=e.mix,this.softness=e.softness,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch,this.bones=new Array;for(var n=0;n180?d-=360:d<-180&&(d+=360);var S=e.ascaleX,w=e.ascaleY;if(i||a){switch(e.data.transformMode){case Fe.NoScale:case Fe.NoScaleOrReflection:p=r-e.worldX,v=n-e.worldY}var E=e.data.length*S,T=Math.sqrt(p*p+v*v);if(i&&TE&&E>1e-4){var g=(T/E-1)*s+1;S*=g,o&&(w*=g)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*s,S,w,e.ashearX,e.ashearY)},t.prototype.apply2=function(e,r,n,i,a,o,s,u){if(u==0){r.updateWorldTransform();return}e.appliedValid||e.updateAppliedTransform(),r.appliedValid||r.updateAppliedTransform();var l=e.ax,c=e.ay,f=e.ascaleX,h=f,d=e.ascaleY,p=r.ascaleX,v=e.matrix,g=0,m=0,y=0;f<0?(f=-f,g=180,y=-1):(g=0,y=1),d<0&&(d=-d,y=-y),p<0?(p=-p,m=180):m=0;var _=r.ax,x=0,b=0,S=0,w=v.a,E=v.c,T=v.b,A=v.d,O=Math.abs(f-d)<=1e-4;O?(x=r.ay,b=w*_+E*x+v.tx,S=T*_+A*x+v.ty):(x=0,b=w*_+v.tx,S=T*_+v.ty);var P=e.parent.matrix;w=P.a,E=P.c,T=P.b,A=P.d;var k=1/(w*A-E*T),M=b-P.tx,B=S-P.ty,j=(M*A-B*E)*k-l,z=(B*w-M*T)*k-c,J=Math.sqrt(j*j+z*z),Z=r.data.length*p,$,F;if(J<1e-4){this.apply1(e,n,i,!1,o,!1,u),r.updateWorldTransformWith(_,x,0,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY);return}M=n-P.tx,B=i-P.ty;var G=(M*A-B*E)*k-l,V=(B*w-M*T)*k-c,U=G*G+V*V;if(s!=0){s*=f*(p+1)/2;var H=Math.sqrt(U),ee=H-J-Z*f+s;if(ee>0){var ie=Math.min(1,ee/(s*2))-1;ie=(ee-s*(1-ie*ie))/H,G-=ie*G,V-=ie*V,U=G*G+V*V}}e:if(O){Z*=f;var ae=(U-J*J-Z*Z)/(2*J*Z);ae<-1?ae=-1:ae>1&&(ae=1,o&&(h*=(Math.sqrt(U)/(J+Z)-1)*u+1)),F=Math.acos(ae)*a,w=J+Z*ae,E=Z*Math.sin(F),$=Math.atan2(V*w-G*E,G*w+V*E)}else{w=f*Z,E=d*Z;var pe=w*w,ye=E*E,oe=Math.atan2(V,G);T=ye*J*J+pe*U-pe*ye;var _e=-2*ye*J,Ce=ye-pe;if(A=_e*_e-4*Ce*T,A>=0){var be=Math.sqrt(A);_e<0&&(be=-be),be=-(_e+be)/2;var Oe=be/Ce,ke=T/be,we=Math.abs(Oe)=-1&&T<=1&&(T=Math.acos(T),M=w*Math.cos(T)+J,B=E*Math.sin(T),A=M*M+B*B,Alr&&(Ht=T,lr=A,_t=M,Dr=B)),U<=(Et+lr)/2?($=oe-Math.atan2($t*a,tt),F=Xe*a):($=oe-Math.atan2(Dr*a,_t),F=Ht*a)}var ur=Math.atan2(x,_)*y,xr=e.arotation;$=($-ur)*N.radDeg+g-xr,$>180?$-=360:$<-180&&($+=360),e.updateWorldTransformWith(l,c,xr+$*u,h,e.ascaleY,0,0),xr=r.arotation,F=((F+ur)*N.radDeg-r.ashearX)*y+m-xr,F>180?F-=360:F<-180&&(F+=360),r.updateWorldTransformWith(_,x,xr+F*u,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),Xw=function(t){Nt(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return e}(vm),zw=function(t){Nt(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n}return e}(vm),dr;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"})(dr||(dr={}));var a3=function(){function t(e,r){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var n=0,i=e.bones.length;n0,a=r>0;if(!(!i&&!a)){var o=this.data,s=o.spacingMode,u=s==dr.Length,l=o.rotateMode,c=l==zt.Tangent,f=l==zt.ChainScale,h=this.bones.length,d=c?h:h+1,p=this.bones,v=q.setArraySize(this.spaces,d),g=null,m=this.spacing;if(f||u){f&&(g=q.setArraySize(this.lengths,h));for(var y=0,_=d-1;y<_;){var x=p[y],b=x.data.length;if(b0?N.degRad:-N.degRad}for(var y=0,M=3;yN.PI?U-=N.PI2:U<-N.PI&&(U+=N.PI2),U*=r,H=Math.cos(U),ee=Math.sin(U),B.a=H*$-ee*G,B.c=H*F-ee*V,B.b=ee*$+H*G,B.d=ee*F+H*V}x.appliedValid=!1}}}},t.prototype.computeWorldPositions=function(e,r,n,i,a){var o=this.target,s=this.position,u=this.spaces,l=q.setArraySize(this.positions,r*3+2),c=null,f=e.closed,h=e.worldVerticesLength,d=h/6,p=t.NONE;if(!e.constantSpeed){var v=e.lengths;d-=f?1:2;var g=v[d];if(i&&(s*=g),a)for(var m=0;mg){p!=t.AFTER&&(p=t.AFTER,e.computeWorldVertices(o,h-6,4,c,0,2)),this.addAfterPosition(b-g,c,0,l,y);continue}for(;;_++){var S=v[_];if(!(b>S)){if(_==0)b/=S;else{var w=v[_-1];b=(b-w)/(S-w)}break}}_!=p&&(p=_,f&&_==d?(e.computeWorldVertices(o,h-4,4,c,0,2),e.computeWorldVertices(o,0,4,c,4,2)):e.computeWorldVertices(o,_*6+2,8,c,0,2)),this.addCurvePosition(b,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,y,n||m>0&&x==0)}return l}f?(h+=2,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h-4,c,0,2),e.computeWorldVertices(o,0,2,c,h-4,2),c[h-2]=c[0],c[h-1]=c[1]):(d--,h-=4,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h,c,0,2));for(var E=q.setArraySize(this.curves,d),T=0,A=c[0],O=c[1],P=0,k=0,M=0,B=0,j=0,z=0,J=0,Z=0,$=0,F=0,G=0,V=0,U=0,H=0,m=0,ee=2;mT){this.addAfterPosition(b-T,c,h-4,l,y);continue}for(;;_++){var ye=E[_];if(!(b>ye)){if(_==0)b/=ye;else{var w=E[_-1];b=(b-w)/(ye-w)}break}}if(_!=p){p=_;var oe=_*6;for(A=c[oe],O=c[oe+1],P=c[oe+2],k=c[oe+3],M=c[oe+4],B=c[oe+5],j=c[oe+6],z=c[oe+7],J=(A-P*2+M)*.03,Z=(O-k*2+B)*.03,$=((P-M)*3-A+j)*.006,F=((k-B)*3-O+z)*.006,G=J*2+$,V=Z*2+F,U=(P-A)*.3+J+$*.16666667,H=(k-O)*.3+Z+F*.16666667,ae=Math.sqrt(U*U+H*H),ie[0]=ae,oe=1;oe<8;oe++)U+=G,H+=V,G+=$,V+=F,ae+=Math.sqrt(U*U+H*H),ie[oe]=ae;U+=G,H+=V,ae+=Math.sqrt(U*U+H*H),ie[8]=ae,U+=G+$,H+=V+F,ae+=Math.sqrt(U*U+H*H),ie[9]=ae,pe=0}for(b*=ae;;pe++){var _e=ie[pe];if(!(b>_e)){if(pe==0)b/=_e;else{var w=ie[pe-1];b=pe+(b-w)/(_e-w)}break}}this.addCurvePosition(b*.1,A,O,P,k,M,B,j,z,l,y,n||m>0&&x==0)}return l},t.prototype.addBeforePosition=function(e,r,n,i,a){var o=r[n],s=r[n+1],u=r[n+2]-o,l=r[n+3]-s,c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addAfterPosition=function(e,r,n,i,a){var o=r[n+2],s=r[n+3],u=o-r[n],l=s-r[n+1],c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addCurvePosition=function(e,r,n,i,a,o,s,u,l,c,f,h){(e==0||isNaN(e))&&(e=1e-4);var d=e*e,p=d*e,v=1-e,g=v*v,m=g*v,y=v*e,_=y*3,x=v*_,b=_*e,S=r*m+i*x+o*b+u*p,w=n*m+a*x+s*b+l*p;c[f]=S,c[f+1]=w,h&&(c[f+2]=Math.atan2(w-(n*g+a*y*2+s*d),S-(r*g+i*y*2+o*d)))},t.NONE=-1,t.BEFORE=-2,t.AFTER=-3,t.epsilon=1e-5,t}(),o3=function(){function t(e,r){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new gf,this.active=!1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var n=0;n0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=(O.x-_.tx)*r,_.ty+=(O.y-_.ty)*r,y=!0}if(n>0){var P=Math.sqrt(_.a*_.a+_.b*_.b),k=Math.sqrt(s*s+l*l);P>1e-5&&(P=(P+(k-P+this.data.offsetScaleX)*n)/P),_.a*=P,_.b*=P,P=Math.sqrt(_.c*_.c+_.d*_.d),k=Math.sqrt(u*u+c*c),P>1e-5&&(P=(P+(k-P+this.data.offsetScaleY)*n)/P),_.c*=P,_.d*=P,y=!0}if(i>0){var b=_.c,w=_.d,M=Math.atan2(w,b),E=Math.atan2(c,u)-Math.atan2(l,s)-(M-Math.atan2(_.b,_.a));E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E=M+(E+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target,o=a.matrix,s=o.a,u=o.c,l=o.b,c=o.d,f=s*c-u*l>0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=O.x*r,_.ty+=O.y*r,y=!0}if(n>0){var P=(Math.sqrt(s*s+l*l)-1+this.data.offsetScaleX)*n+1;_.a*=P,_.b*=P,P=(Math.sqrt(u*u+c*c)-1+this.data.offsetScaleY)*n+1,_.c*=P,_.d*=P,y=!0}if(i>0){var E=Math.atan2(c,u)-Math.atan2(l,s);E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2);var b=_.c,w=_.d;E=Math.atan2(w,b)+(E-N.PI/2+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyAbsoluteLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(p>1e-5&&(p=(p+(a.ascaleX-p+this.data.offsetScaleX)*n)/p),v>1e-5&&(v=(v+(a.ascaleY-v+this.data.offsetScaleY)*n)/v));var g=l.ashearY;if(i>0){var f=a.ashearY-g+this.data.offsetShearY;f-=(16384-(16384.499999999996-f/360|0))*360,l.shearY+=f*i}l.updateWorldTransformWith(h,d,c,p,v,l.ashearX,g)}},t.prototype.applyRelativeLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(d>1e-5&&(d*=(a.ascaleX-1+this.data.offsetScaleX)*n+1),p>1e-5&&(p*=(a.ascaleY-1+this.data.offsetScaleY)*n+1));var v=l.ashearY;i>0&&(v+=(a.ashearY+this.data.offsetShearY)*i),l.updateWorldTransformWith(f,h,c,d,p,l.ashearX,v)}},t}(),s3=function(){function t(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,e==null)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var r=0;r1){var a=n[n.length-1];this._updateCache.indexOf(a)>-1||this.updateCacheReset.push(a)}this._updateCache.push(e),this.sortReset(i.children),n[n.length-1].sorted=!0}},t.prototype.sortPathConstraint=function(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||this.skin!=null&&q.contains(this.skin.constraints,e.data,!0)),!!e.active){var r=e.target,n=r.data.index,i=r.bone;this.skin!=null&&this.sortPathConstraintAttachment(this.skin,n,i),this.data.defaultSkin!=null&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,i);for(var a=0,o=this.data.skins.length;a-1||this.updateCacheReset.push(a)}else for(var i=0;i= 0.");if(r==null)throw new Error("name cannot be null.");if(n==null)throw new Error("boneData cannot be null.");this.index=e,this.name=r,this.boneData=n}return t}(),Hw=function(t){Nt(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n.rotateMix=0,n.translateMix=0,n.scaleMix=0,n.shearMix=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return e}(vm),r1=function(){function t(e,r,n){this.slotIndex=e,this.name=r,this.attachment=n}return t}(),Op=function(){function t(e){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,e==null)throw new Error("name cannot be null.");this.name=e}return t.prototype.setAttachment=function(e,r,n){if(n==null)throw new Error("attachment cannot be null.");var i=this.attachments;e>=i.length&&(i.length=e+1),i[e]||(i[e]={}),i[e][r]=n},t.prototype.addSkin=function(e){for(var r=0;r0){for(var g=new Ol(Z),$=n.slots.length,l=0;l=0;h--)G[h]=-1;for(var V=q.newArray($-F,0),U=0,H=0,h=0;h=0;h--)G[h]==-1&&(G[h]=V[--H]);g.setFrame(l,y,G)}i.push(g),o=Math.max(o,g.frames[Z-1])}var ee=e.readInt(!0);if(ee>0){for(var g=new pm(ee),l=0;l=0;p--)ye[p]==-1&&(ye[p]=_e[--be])}h.setFrame(d++,this.getValue(pe,"time",0),ye)}a.push(h),o=Math.max(o,h.frames[h.getFrameCount()-1])}if(e.events){for(var h=new pm(e.events.length),d=0,p=0;p>1)*s;var u=r.bone.skeleton,l=r.deform,c=this.vertices,f=this.bones;if(f==null){l.length>0&&(c=l);for(var h=r.bone.matrix,d=h.tx,p=h.ty,v=h.a,g=h.c,m=h.b,y=h.d,_=n,x=o;x0&&(r%=this.duration));for(var l=this.timelines,c=0,f=l.length;c>>1;;){if(e[(o+1)*n]<=r?i=o+1:a=o,i==a)return(i+1)*n;o=i+a>>>1}},t.linearSearch=function(e,r,n){for(var i=0,a=e.length-n;i<=a;i+=n)if(e[i]>r)return i;return-1},t}(),Mr;(function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"})(Mr||(Mr={}));var ha=function(){function t(e){if(e<=0)throw new Error("frameCount must be > 0: "+e);this.curves=q.newFloatArray((e-1)*t.BEZIER_SIZE)}return t.prototype.getFrameCount=function(){return this.curves.length/t.BEZIER_SIZE+1},t.prototype.setLinear=function(e){this.curves[e*t.BEZIER_SIZE]=t.LINEAR},t.prototype.setStepped=function(e){this.curves[e*t.BEZIER_SIZE]=t.STEPPED},t.prototype.getCurveType=function(e){var r=e*t.BEZIER_SIZE;if(r==this.curves.length)return t.LINEAR;var n=this.curves[r];return n==t.LINEAR?t.LINEAR:n==t.STEPPED?t.STEPPED:t.BEZIER},t.prototype.setCurve=function(e,r,n,i,a){var o=(-r*2+i)*.03,s=(-n*2+a)*.03,u=((r-i)*3+1)*.006,l=((n-a)*3+1)*.006,c=o*2+u,f=s*2+l,h=r*.3+o+u*.16666667,d=n*.3+s+l*.16666667,p=e*t.BEZIER_SIZE,v=this.curves;v[p++]=t.BEZIER;for(var g=h,m=d,y=p+t.BEZIER_SIZE-1;p=r){var l=void 0,c=void 0;return i==s?(l=0,c=0):(l=n[i-2],c=n[i-1]),c+(n[i+1]-c)*(r-l)/(o-l)}var f=n[i-1];return f+(1-f)*(r-o)/(1-o)},t.LINEAR=0,t.STEPPED=1,t.BEZIER=2,t.BEZIER_SIZE=10*2-1,t}(),Mn=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r<<1),n}return e.prototype.getPropertyId=function(){return(Mr.rotate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i){r<<=1,this.frames[r]=n,this.frames[r+e.ROTATION]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES]){var h=l[l.length+e.PREV_ROTATION];switch(s){case R.setup:c.rotation=c.data.rotation+h*o;break;case R.first:case R.replace:h+=c.data.rotation-c.rotation,h-=(16384-(16384.499999999996-h/360|0))*360;case R.add:c.rotation+=h*o}return}var d=er.binarySearch(l,i,e.ENTRIES),p=l[d+e.PREV_ROTATION],v=l[d],g=this.getCurvePercent((d>>1)-1,1-(i-v)/(l[d+e.PREV_TIME]-v)),m=l[d+e.ROTATION]-p;switch(m=p+(m-(16384-(16384.499999999996-m/360|0))*360)*g,s){case R.setup:c.rotation=c.data.rotation+(m-(16384-(16384.499999999996-m/360|0))*360)*o;break;case R.first:case R.replace:m+=c.data.rotation-c.rotation;case R.add:c.rotation+=(m-(16384-(16384.499999999996-m/360|0))*360)*o}}},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_ROTATION=-1,e.ROTATION=1,e}(ha),Ss=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.translate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.X]=i,this.frames[r+e.Y]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.X]-f)*v,h+=(l[d+e.Y]-h)*v}switch(s){case R.setup:c.x=c.data.x+f*o,c.y=c.data.y+h*o;break;case R.first:case R.replace:c.x+=(c.data.x+f-c.x)*o,c.y+=(c.data.y+h-c.y)*o;break;case R.add:c.x+=f*o,c.y+=h*o}}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_X=-2,e.PREV_Y=-1,e.X=1,e.Y=2,e}(ha),Dw=function(t){Nt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Mr.scale<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X]*c.data.scaleX,h=l[l.length+e.PREV_Y]*c.data.scaleY;else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=(f+(l[d+e.X]-f)*v)*c.data.scaleX,h=(h+(l[d+e.Y]-h)*v)*c.data.scaleY}if(o==1)s==R.add?(c.scaleX+=f-c.data.scaleX,c.scaleY+=h-c.data.scaleY):(c.scaleX=f,c.scaleY=h);else{var g=0,m=0;if(u==je.mixOut)switch(s){case R.setup:g=c.data.scaleX,m=c.data.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.first:case R.replace:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.add:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-c.data.scaleX)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-c.data.scaleY)*o}else switch(s){case R.setup:g=Math.abs(c.data.scaleX)*N.signum(f),m=Math.abs(c.data.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.first:case R.replace:g=Math.abs(c.scaleX)*N.signum(f),m=Math.abs(c.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.add:g=N.signum(f),m=N.signum(h),c.scaleX=Math.abs(c.scaleX)*g+(f-Math.abs(c.data.scaleX)*g)*o,c.scaleY=Math.abs(c.scaleY)*m+(h-Math.abs(c.data.scaleY)*m)*o}}}},e}(Ss),Bw=function(t){Nt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Mr.shear<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=f+(l[d+e.X]-f)*v,h=h+(l[d+e.Y]-h)*v}switch(s){case R.setup:c.shearX=c.data.shearX+f*o,c.shearY=c.data.shearY+h*o;break;case R.first:case R.replace:c.shearX+=(c.data.shearX+f-c.shearX)*o,c.shearY+=(c.data.shearY+h-c.shearY)*o;break;case R.add:c.shearX+=f*o,c.shearY+=h*o}}},e}(Ss),_f=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.color<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=this.frames;if(i=c[c.length-e.ENTRIES]){var m=c.length;d=c[m+e.PREV_R],p=c[m+e.PREV_G],v=c[m+e.PREV_B],g=c[m+e.PREV_A]}else{var y=er.binarySearch(c,i,e.ENTRIES);d=c[y+e.PREV_R],p=c[y+e.PREV_G],v=c[y+e.PREV_B],g=c[y+e.PREV_A];var _=c[y],x=this.getCurvePercent(y/e.ENTRIES-1,1-(i-_)/(c[y+e.PREV_TIME]-_));d+=(c[y+e.R]-d)*x,p+=(c[y+e.G]-p)*x,v+=(c[y+e.B]-v)*x,g+=(c[y+e.A]-g)*x}if(o==1)l.color.set(d,p,v,g);else{var f=l.color;s==R.setup&&f.setFromColor(l.data.color),f.add((d-f.r)*o,(p-f.g)*o,(v-f.b)*o,(g-f.a)*o)}}},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_R=-4,e.PREV_G=-3,e.PREV_B=-2,e.PREV_A=-1,e.R=1,e.G=2,e.B=3,e.A=4,e}(ha),xf=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.twoColor<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s,u,l,c){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s,this.frames[r+e.R2]=u,this.frames[r+e.G2]=l,this.frames[r+e.B2]=c},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=this.frames;if(i=c[c.length-e.ENTRIES]){var S=c.length;v=c[S+e.PREV_R],g=c[S+e.PREV_G],m=c[S+e.PREV_B],y=c[S+e.PREV_A],_=c[S+e.PREV_R2],x=c[S+e.PREV_G2],b=c[S+e.PREV_B2]}else{var w=er.binarySearch(c,i,e.ENTRIES);v=c[w+e.PREV_R],g=c[w+e.PREV_G],m=c[w+e.PREV_B],y=c[w+e.PREV_A],_=c[w+e.PREV_R2],x=c[w+e.PREV_G2],b=c[w+e.PREV_B2];var E=c[w],T=this.getCurvePercent(w/e.ENTRIES-1,1-(i-E)/(c[w+e.PREV_TIME]-E));v+=(c[w+e.R]-v)*T,g+=(c[w+e.G]-g)*T,m+=(c[w+e.B]-m)*T,y+=(c[w+e.A]-y)*T,_+=(c[w+e.R2]-_)*T,x+=(c[w+e.G2]-x)*T,b+=(c[w+e.B2]-b)*T}if(o==1)l.color.set(v,g,m,y),l.darkColor.set(_,x,b,1);else{var f=l.color,h=l.darkColor;s==R.setup&&(f.setFromColor(l.data.color),h.setFromColor(l.data.darkColor)),f.add((v-f.r)*o,(g-f.g)*o,(m-f.b)*o,(y-f.a)*o),h.add((_-h.r)*o,(x-h.g)*o,(b-h.b)*o,0)}}},e.ENTRIES=8,e.PREV_TIME=-8,e.PREV_R=-7,e.PREV_G=-6,e.PREV_B=-5,e.PREV_A=-4,e.PREV_R2=-3,e.PREV_G2=-2,e.PREV_B2=-1,e.R=1,e.G=2,e.B=3,e.A=4,e.R2=5,e.G2=6,e.B2=7,e}(ha),ns=function(){function t(e){this.frames=q.newFloatArray(e),this.attachmentNames=new Array(e)}return t.prototype.getPropertyId=function(){return(Mr.attachment<<24)+this.slotIndex},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.attachmentNames[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.slots[this.slotIndex];if(u.bone.active){if(s==je.mixOut){o==R.setup&&this.setAttachment(e,u,u.data.attachmentName);return}var l=this.frames;if(n=l[l.length-1]?c=l.length-1:c=er.binarySearch(l,n,1)-1;var f=this.attachmentNames[c];e.slots[this.slotIndex].setAttachment(f==null?null:e.getAttachment(this.slotIndex,f))}},t.prototype.setAttachment=function(e,r,n){r.setAttachment(n==null?null:e.getAttachment(this.slotIndex,n))},t}(),mO=null,jw=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r),n.frameVertices=new Array(r),mO==null&&(mO=q.newFloatArray(64)),n}return e.prototype.getPropertyId=function(){return(Mr.deform<<27)+ +this.attachment.id+this.slotIndex},e.prototype.setFrame=function(r,n,i){this.frames[r]=n,this.frameVertices[r]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.getAttachment();if(!(!(c instanceof Fs)||c.deformAttachment!=this.attachment)){var f=l.deform;f.length==0&&(s=R.setup);var h=this.frameVertices,d=h[0].length,p=this.frames;if(i=p[p.length-1]){var x=h[p.length-1];if(o==1)if(s==R.add){var v=c;if(v.bones==null)for(var m=v.vertices,b=0;bn)this.apply(e,r,Number.MAX_VALUE,i,a,o,s),r=-1;else if(r>=u[l-1])return;if(!(n0&&u[c-1]==f;)c--}for(;c=u[c];c++)i.push(this.events[c])}}},t}(),Ol=function(){function t(e){this.frames=q.newFloatArray(e),this.drawOrders=new Array(e)}return t.prototype.getPropertyId=function(){return Mr.drawOrder<<24},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.drawOrders[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.drawOrder,l=e.slots;if(s==je.mixOut&&o==R.setup){q.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length);return}var c=this.frames;if(n=c[c.length-1]?f=c.length-1:f=er.binarySearch(c,n)-1;var h=this.drawOrders[f];if(h==null)q.arrayCopy(l,0,u,0,l.length);else for(var d=0,p=h.length;d=l[l.length-e.ENTRIES]){s==R.setup?(c.mix=c.data.mix+(l[l.length+e.PREV_MIX]-c.data.mix)*o,c.softness=c.data.softness+(l[l.length+e.PREV_SOFTNESS]-c.data.softness)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0)):(c.mix+=(l[l.length+e.PREV_MIX]-c.mix)*o,c.softness+=(l[l.length+e.PREV_SOFTNESS]-c.softness)*o,u==je.mixIn&&(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0));return}var f=er.binarySearch(l,i,e.ENTRIES),h=l[f+e.PREV_MIX],d=l[f+e.PREV_SOFTNESS],p=l[f],v=this.getCurvePercent(f/e.ENTRIES-1,1-(i-p)/(l[f+e.PREV_TIME]-p));s==R.setup?(c.mix=c.data.mix+(h+(l[f+e.MIX]-h)*v-c.data.mix)*o,c.softness=c.data.softness+(d+(l[f+e.SOFTNESS]-d)*v-c.data.softness)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0)):(c.mix+=(h+(l[f+e.MIX]-h)*v-c.mix)*o,c.softness+=(d+(l[f+e.SOFTNESS]-d)*v-c.softness)*o,u==je.mixIn&&(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0))}},e.ENTRIES=6,e.PREV_TIME=-6,e.PREV_MIX=-5,e.PREV_SOFTNESS=-4,e.PREV_BEND_DIRECTION=-3,e.PREV_COMPRESS=-2,e.PREV_STRETCH=-1,e.MIX=1,e.SOFTNESS=2,e.BEND_DIRECTION=3,e.COMPRESS=4,e.STRETCH=5,e}(ha),Sf=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.transformConstraint<<24)+this.transformConstraintIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a,this.frames[r+e.SCALE]=o,this.frames[r+e.SHEAR]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.transformConstraints[this.transformConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES]){var g=l.length;h=l[g+e.PREV_ROTATE],d=l[g+e.PREV_TRANSLATE],p=l[g+e.PREV_SCALE],v=l[g+e.PREV_SHEAR]}else{var m=er.binarySearch(l,i,e.ENTRIES);h=l[m+e.PREV_ROTATE],d=l[m+e.PREV_TRANSLATE],p=l[m+e.PREV_SCALE],v=l[m+e.PREV_SHEAR];var y=l[m],_=this.getCurvePercent(m/e.ENTRIES-1,1-(i-y)/(l[m+e.PREV_TIME]-y));h+=(l[m+e.ROTATE]-h)*_,d+=(l[m+e.TRANSLATE]-d)*_,p+=(l[m+e.SCALE]-p)*_,v+=(l[m+e.SHEAR]-v)*_}if(s==R.setup){var f=c.data;c.rotateMix=f.rotateMix+(h-f.rotateMix)*o,c.translateMix=f.translateMix+(d-f.translateMix)*o,c.scaleMix=f.scaleMix+(p-f.scaleMix)*o,c.shearMix=f.shearMix+(v-f.shearMix)*o}else c.rotateMix+=(h-c.rotateMix)*o,c.translateMix+=(d-c.translateMix)*o,c.scaleMix+=(p-c.scaleMix)*o,c.shearMix+=(v-c.shearMix)*o}},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_ROTATE=-4,e.PREV_TRANSLATE=-3,e.PREV_SCALE=-2,e.PREV_SHEAR=-1,e.ROTATE=1,e.TRANSLATE=2,e.SCALE=3,e.SHEAR=4,e}(ha),ql=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.pathConstraintPosition<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.VALUE]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=er.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.position=c.data.position+(f-c.data.position)*o:c.position+=(f-c.position)*o}},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_VALUE=-1,e.VALUE=1,e}(ha),Uw=function(t){Nt(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Mr.pathConstraintSpacing<<24)+this.pathConstraintIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=er.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*o:c.spacing+=(f-c.spacing)*o}},e}(ql),wf=function(t){Nt(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Mr.pathConstraintMix<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(c.active){if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_ROTATE],h=l[l.length+e.PREV_TRANSLATE];else{var d=er.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_ROTATE],h=l[d+e.PREV_TRANSLATE];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.ROTATE]-f)*v,h+=(l[d+e.TRANSLATE]-h)*v}s==R.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*o,c.translateMix=c.data.translateMix+(h-c.data.translateMix)*o):(c.rotateMix+=(f-c.rotateMix)*o,c.translateMix+=(h-c.translateMix)*o)}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_ROTATE=-2,e.PREV_TRANSLATE=-1,e.ROTATE=1,e.TRANSLATE=2,e}(ha),t3=function(){function t(e){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new n3(this),this.propertyIDs=new qD,this.animationsChanged=!1,this.trackEntryPool=new hm(function(){return new r3}),this.data=e}return t.prototype.update=function(e){e*=this.timeScale;for(var r=this.tracks,n=0,i=r.length;n0){if(a.delay-=o,a.delay>0)continue;o=-a.delay,a.delay=0}var s=a.next;if(s!=null){var u=a.trackLast-s.delay;if(u>=0){for(s.delay=0,s.trackTime+=a.timeScale==0?0:(u/a.timeScale+e)*s.timeScale,a.trackTime+=o,this.setCurrent(n,s,!0);s.mixingFrom!=null;)s.mixTime+=e,s=s.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&a.mixingFrom==null){r[n]=null,this.queue.end(a),this.disposeNext(a);continue}if(a.mixingFrom!=null&&this.updateMixingFrom(a,e)){var l=a.mixingFrom;for(a.mixingFrom=null,l!=null&&(l.mixingTo=null);l!=null;)this.queue.end(l),l=l.mixingFrom}a.trackTime+=o}}this.queue.drain()},t.prototype.updateMixingFrom=function(e,r){var n=e.mixingFrom;if(n==null)return!0;var i=this.updateMixingFrom(n,r);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.mixTime>0&&e.mixTime>=e.mixDuration?((n.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=n.mixingFrom,n.mixingFrom!=null&&(n.mixingFrom.mixingTo=e),e.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=r*n.timeScale,e.mixTime+=r,!1)},t.prototype.apply=function(e){if(e==null)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,n=this.tracks,i=!1,a=0,o=n.length;a0)){i=!0;var u=a==0?R.first:s.mixBlend,l=s.alpha;s.mixingFrom!=null?l*=this.applyMixingFrom(s,e,u):s.trackTime>=s.trackEnd&&s.next==null&&(l=0);var c=s.animationLast,f=s.getAnimationTime(),h=s.animation.timelines.length,d=s.animation.timelines;if(a==0&&l==1||u==R.add)for(var p=0;p1&&(a=1),n!=R.first&&(n=i.mixBlend));var o=a0&&this.queueEvents(i,c),this.events.length=0,i.nextAnimationLast=c,i.nextTrackLast=i.trackTime,a},t.prototype.applyAttachmentTimeline=function(e,r,n,i,a){var o=r.slots[e.slotIndex];if(o.bone.active){var s=e.frames;if(n=s[s.length-1]?u=s.length-1:u=er.binarySearch(s,n)-1,this.setAttachment(r,o,e.attachmentNames[u],a)}o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+t.SETUP)}},t.prototype.setAttachment=function(e,r,n,i){r.setAttachment(n==null?null:e.getAttachment(r.data.index,n)),i&&(r.attachmentState=this.unkeyedState+t.CURRENT)},t.prototype.applyRotateTimeline=function(e,r,n,i,a,o,s,u){if(u&&(o[s]=0),i==1){e.apply(r,0,n,null,1,a,je.mixIn);return}var l=e,c=l.frames,f=r.bones[l.boneIndex];if(f.active){var h=0,d=0;if(n=c[c.length-Mn.ENTRIES])d=f.data.rotation+c[c.length+Mn.PREV_ROTATION];else{var p=er.binarySearch(c,n,Mn.ENTRIES),v=c[p+Mn.PREV_ROTATION],g=c[p],m=l.getCurvePercent((p>>1)-1,1-(n-g)/(c[p+Mn.PREV_TIME]-g));d=c[p+Mn.ROTATION]-v,d-=(16384-(16384.499999999996-d/360|0))*360,d=v+d*m+f.data.rotation,d-=(16384-(16384.499999999996-d/360|0))*360}var y=0,_=d-h;if(_-=(16384-(16384.499999999996-_/360|0))*360,_==0)y=o[s];else{var x=0,b=0;u?(x=0,b=_):(x=o[s],b=o[s+1]);var S=_>0,w=x>=0;N.signum(b)!=N.signum(_)&&Math.abs(b)<=90&&(Math.abs(x)>180&&(x+=360*N.signum(x)),w=S),y=_+x-x%360,w!=S&&(y+=360*N.signum(x)),o[s]=y}o[s+1]=_,h+=y*i,f.rotation=h-(16384-(16384.499999999996-h/360|0))*360}},t.prototype.queueEvents=function(e,r){for(var n=e.animationStart,i=e.animationEnd,a=i-n,o=e.trackLast%a,s=this.events,u=0,l=s.length;ui||this.queue.event(e,c)}var f=!1;for(e.loop?f=a==0||o>e.trackTime%a:f=r>=i&&e.animationLast=this.tracks.length)){var r=this.tracks[e];if(r!=null){this.queue.end(r),this.disposeNext(r);for(var n=r;;){var i=n.mixingFrom;if(i==null)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[r.trackIndex]=null,this.queue.drain()}}},t.prototype.setCurrent=function(e,r,n){var i=this.expandToIndex(e);this.tracks[e]=r,i!=null&&(n&&this.queue.interrupt(i),r.mixingFrom=i,i.mixingTo=r,r.mixTime=0,i.mixingFrom!=null&&i.mixDuration>0&&(r.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(r)},t.prototype.setAnimation=function(e,r,n){var i=this.data.skeletonData.findAnimation(r);if(i==null)throw new Error("Animation not found: "+r);return this.setAnimationWith(e,i,n)},t.prototype.setAnimationWith=function(e,r,n){if(r==null)throw new Error("animation cannot be null.");var i=!0,a=this.expandToIndex(e);a!=null&&(a.nextTrackLast==-1?(this.tracks[e]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.disposeNext(a),a=a.mixingFrom,i=!1):this.disposeNext(a));var o=this.trackEntry(e,r,n,a);return this.setCurrent(e,o,i),this.queue.drain(),o},t.prototype.addAnimation=function(e,r,n,i){var a=this.data.skeletonData.findAnimation(r);if(a==null)throw new Error("Animation not found: "+r);return this.addAnimationWith(e,a,n,i)},t.prototype.addAnimationWith=function(e,r,n,i){if(r==null)throw new Error("animation cannot be null.");var a=this.expandToIndex(e);if(a!=null)for(;a.next!=null;)a=a.next;var o=this.trackEntry(e,r,n,a);if(a==null)this.setCurrent(e,o,!0),this.queue.drain();else if(a.next=o,i<=0){var s=a.animationEnd-a.animationStart;s!=0?(a.loop?i+=s*(1+(a.trackTime/s|0)):i+=Math.max(s,a.trackTime),i-=this.data.getMix(a.animation,r)):i=a.trackTime}return o.delay=i,o},t.prototype.setEmptyAnimation=function(e,r){var n=this.setAnimationWith(e,t.emptyAnimation,!1);return n.mixDuration=r,n.trackEnd=r,n},t.prototype.addEmptyAnimation=function(e,r,n){n<=0&&(n-=r);var i=this.addAnimationWith(e,t.emptyAnimation,!1,n);return i.mixDuration=r,i.trackEnd=r,i},t.prototype.setEmptyAnimations=function(e){var r=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n0){a[u]=t.HOLD_MIX,o[u]=f;continue e}break}a[u]=t.HOLD_FIRST}}},t.prototype.getCurrent=function(e){return e>=this.tracks.length?null:this.tracks[e]},t.prototype.addListener=function(e){if(e==null)throw new Error("listener cannot be null.");this.listeners.push(e)},t.prototype.removeListener=function(e){var r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)},t.prototype.clearListeners=function(){this.listeners.length=0},t.prototype.clearListenerNotifications=function(){this.queue.clear()},t.prototype.setAnimationByName=function(e,r,n){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(e,r,n)},t.prototype.addAnimationByName=function(e,r,n,i){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(e,r,n,i)},t.prototype.hasAnimation=function(e){var r=this.data.skeletonData.findAnimation(e);return r!==null},t.prototype.hasAnimationByName=function(e){return t.deprecatedWarning3||(t.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(e)},t.emptyAnimation=new er("",[],0),t.SUBSEQUENT=0,t.FIRST=1,t.HOLD_SUBSEQUENT=2,t.HOLD_FIRST=3,t.HOLD_MIX=4,t.SETUP=1,t.CURRENT=2,t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),r3=function(){function t(){this.mixBlend=R.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return t.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},t.prototype.getAnimationTime=function(){if(this.loop){var e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},t.prototype.setAnimationLast=function(e){this.animationLast=e,this.nextAnimationLast=e},t.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},t.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},Object.defineProperty(t.prototype,"time",{get:function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime},set:function(e){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endTime",{get:function(){return t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime},set:function(e){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),t.prototype.loopsCount=function(){return Math.floor(this.trackTime/this.trackEnd)},t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t}(),n3=function(){function t(e){this.objects=[],this.drainDisabled=!1,this.animState=e}return t.prototype.start=function(e){this.objects.push(on.start),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.interrupt=function(e){this.objects.push(on.interrupt),this.objects.push(e)},t.prototype.end=function(e){this.objects.push(on.end),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.dispose=function(e){this.objects.push(on.dispose),this.objects.push(e)},t.prototype.complete=function(e){this.objects.push(on.complete),this.objects.push(e)},t.prototype.event=function(e,r){this.objects.push(on.event),this.objects.push(e),this.objects.push(r)},t.prototype.deprecateStuff=function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'")),!0},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var e=this.objects,r=this.animState.listeners,n=0;n1e-4?(S=Math.abs(p*m-v*g)/S,p/=this.skeleton.scaleX,g/=this.skeleton.scaleY,v=g*S,m=p*S,w=Math.atan2(g,p)*N.radDeg):(p=0,g=0,w=90-Math.atan2(m,v)*N.radDeg);var E=n+o-w,T=n+s-w+90,y=N.cosDeg(E)*i,_=N.cosDeg(T)*a,x=N.sinDeg(E)*i,b=N.sinDeg(T)*a;l.a=p*y-v*x,l.c=p*_-v*b,l.b=g*y+m*x,l.d=g*_+m*b;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,k=(g*A+m*O)/f,S=Math.sqrt(P*P+k*k);S>1e-5&&(S=1/S),P*=S,k*=S,S=Math.sqrt(P*P+k*k),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY>0)&&(S=-S);var M=Math.PI/2+Math.atan2(k,P),B=Math.cos(M)*S,j=Math.sin(M)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,x=N.sinDeg(o)*i,b=N.sinDeg(90+s)*a;l.a=P*y+B*x,l.c=P*_+B*b,l.b=k*y+j*x,l.d=k*_+j*b;break}}l.a*=c,l.c*=c,l.b*=f,l.d*=f},t.prototype.setToSetupPose=function(){var e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY},t.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*N.radDeg},t.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*N.radDeg},t.prototype.getWorldScaleX=function(){var e=this.matrix;return Math.sqrt(e.a*e.a+e.c*e.c)},t.prototype.getWorldScaleY=function(){var e=this.matrix;return Math.sqrt(e.b*e.b+e.d*e.d)},t.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent,r=this.matrix;if(e==null){this.ax=r.tx,this.ay=r.ty,this.arotation=Math.atan2(r.b,r.a)*N.radDeg,this.ascaleX=Math.sqrt(r.a*r.a+r.b*r.b),this.ascaleY=Math.sqrt(r.c*r.c+r.d*r.d),this.ashearX=0,this.ashearY=Math.atan2(r.a*r.c+r.b*r.d,r.a*r.d-r.b*r.c)*N.radDeg;return}var n=e.matrix,i=1/(n.a*n.d-n.b*n.c),a=r.tx-n.tx,o=r.ty-n.ty;this.ax=a*n.d*i-o*n.c*i,this.ay=o*n.a*i-a*n.b*i;var s=i*n.d,u=i*n.a,l=i*n.c,c=i*n.b,f=s*r.a-l*r.b,h=s*r.c-l*r.d,d=u*r.b-c*r.a,p=u*r.d-c*r.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+d*d),this.ascaleX>1e-4){var v=f*p-h*d;this.ascaleY=v/this.ascaleX,this.ashearY=Math.atan2(f*h+d*p,v)*N.radDeg,this.arotation=Math.atan2(d,f)*N.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(h*h+p*p),this.ashearY=0,this.arotation=90-Math.atan2(p,h)*N.radDeg},t.prototype.worldToLocal=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=1/(n*o-i*a),u=e.x-r.tx,l=e.y-r.ty;return e.x=u*o*s-l*i*s,e.y=l*n*s-u*a*s,e},t.prototype.localToWorld=function(e){var r=this.matrix,n=e.x,i=e.y;return e.x=n*r.a+i*r.c+r.tx,e.y=n*r.b+i*r.d+r.ty,e},t.prototype.worldToLocalRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(i.a*r-i.b*n,i.d*n-i.c*r)*N.radDeg},t.prototype.localToWorldRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(n*i.b+r*i.d,n*i.a+r*i.c)*N.radDeg},t.prototype.rotateWorld=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=N.cosDeg(e),u=N.sinDeg(e);r.a=s*n-u*a,r.c=s*i-u*o,r.b=u*n+s*a,r.d=u*i+s*o,this.appliedValid=!1},t}(),Vw=function(){function t(e,r,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=Fe.Normal,this.skinRequired=!1,this.color=new de,e<0)throw new Error("index must be >= 0.");if(r==null)throw new Error("name cannot be null.");this.index=e,this.name=r,this.parent=n}return t}(),vm=function(){function t(e,r,n){this.name=e,this.order=r,this.skinRequired=n}return t}(),Gw=function(){function t(e,r){if(r==null)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),Xw=function(){function t(e){this.name=e}return t}(),a3=function(){function t(e,r){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.mix=e.mix,this.softness=e.softness,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch,this.bones=new Array;for(var n=0;n180?d-=360:d<-180&&(d+=360);var S=e.ascaleX,w=e.ascaleY;if(i||a){switch(e.data.transformMode){case Fe.NoScale:case Fe.NoScaleOrReflection:p=r-e.worldX,v=n-e.worldY}var E=e.data.length*S,T=Math.sqrt(p*p+v*v);if(i&&TE&&E>1e-4){var g=(T/E-1)*s+1;S*=g,o&&(w*=g)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*s,S,w,e.ashearX,e.ashearY)},t.prototype.apply2=function(e,r,n,i,a,o,s,u){if(u==0){r.updateWorldTransform();return}e.appliedValid||e.updateAppliedTransform(),r.appliedValid||r.updateAppliedTransform();var l=e.ax,c=e.ay,f=e.ascaleX,h=f,d=e.ascaleY,p=r.ascaleX,v=e.matrix,g=0,m=0,y=0;f<0?(f=-f,g=180,y=-1):(g=0,y=1),d<0&&(d=-d,y=-y),p<0?(p=-p,m=180):m=0;var _=r.ax,x=0,b=0,S=0,w=v.a,E=v.c,T=v.b,A=v.d,O=Math.abs(f-d)<=1e-4;O?(x=r.ay,b=w*_+E*x+v.tx,S=T*_+A*x+v.ty):(x=0,b=w*_+v.tx,S=T*_+v.ty);var P=e.parent.matrix;w=P.a,E=P.c,T=P.b,A=P.d;var k=1/(w*A-E*T),M=b-P.tx,B=S-P.ty,j=(M*A-B*E)*k-l,z=(B*w-M*T)*k-c,J=Math.sqrt(j*j+z*z),Z=r.data.length*p,$,F;if(J<1e-4){this.apply1(e,n,i,!1,o,!1,u),r.updateWorldTransformWith(_,x,0,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY);return}M=n-P.tx,B=i-P.ty;var G=(M*A-B*E)*k-l,V=(B*w-M*T)*k-c,U=G*G+V*V;if(s!=0){s*=f*(p+1)/2;var H=Math.sqrt(U),ee=H-J-Z*f+s;if(ee>0){var ie=Math.min(1,ee/(s*2))-1;ie=(ee-s*(1-ie*ie))/H,G-=ie*G,V-=ie*V,U=G*G+V*V}}e:if(O){Z*=f;var ae=(U-J*J-Z*Z)/(2*J*Z);ae<-1?ae=-1:ae>1&&(ae=1,o&&(h*=(Math.sqrt(U)/(J+Z)-1)*u+1)),F=Math.acos(ae)*a,w=J+Z*ae,E=Z*Math.sin(F),$=Math.atan2(V*w-G*E,G*w+V*E)}else{w=f*Z,E=d*Z;var pe=w*w,ye=E*E,oe=Math.atan2(V,G);T=ye*J*J+pe*U-pe*ye;var _e=-2*ye*J,Ce=ye-pe;if(A=_e*_e-4*Ce*T,A>=0){var be=Math.sqrt(A);_e<0&&(be=-be),be=-(_e+be)/2;var Oe=be/Ce,ke=T/be,we=Math.abs(Oe)=-1&&T<=1&&(T=Math.acos(T),M=w*Math.cos(T)+J,B=E*Math.sin(T),A=M*M+B*B,Alr&&(qt=T,lr=A,_t=M,Dr=B)),U<=(Et+lr)/2?($=oe-Math.atan2($t*a,tt),F=Xe*a):($=oe-Math.atan2(Dr*a,_t),F=qt*a)}var ur=Math.atan2(x,_)*y,br=e.arotation;$=($-ur)*N.radDeg+g-br,$>180?$-=360:$<-180&&($+=360),e.updateWorldTransformWith(l,c,br+$*u,h,e.ascaleY,0,0),br=r.arotation,F=((F+ur)*N.radDeg-r.ashearX)*y+m-br,F>180?F-=360:F<-180&&(F+=360),r.updateWorldTransformWith(_,x,br+F*u,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),zw=function(t){Nt(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return e}(vm),Ww=function(t){Nt(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n}return e}(vm),pr;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"})(pr||(pr={}));var o3=function(){function t(e,r){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var n=0,i=e.bones.length;n0,a=r>0;if(!(!i&&!a)){var o=this.data,s=o.spacingMode,u=s==pr.Length,l=o.rotateMode,c=l==Wt.Tangent,f=l==Wt.ChainScale,h=this.bones.length,d=c?h:h+1,p=this.bones,v=q.setArraySize(this.spaces,d),g=null,m=this.spacing;if(f||u){f&&(g=q.setArraySize(this.lengths,h));for(var y=0,_=d-1;y<_;){var x=p[y],b=x.data.length;if(b0?N.degRad:-N.degRad}for(var y=0,M=3;yN.PI?U-=N.PI2:U<-N.PI&&(U+=N.PI2),U*=r,H=Math.cos(U),ee=Math.sin(U),B.a=H*$-ee*G,B.c=H*F-ee*V,B.b=ee*$+H*G,B.d=ee*F+H*V}x.appliedValid=!1}}}},t.prototype.computeWorldPositions=function(e,r,n,i,a){var o=this.target,s=this.position,u=this.spaces,l=q.setArraySize(this.positions,r*3+2),c=null,f=e.closed,h=e.worldVerticesLength,d=h/6,p=t.NONE;if(!e.constantSpeed){var v=e.lengths;d-=f?1:2;var g=v[d];if(i&&(s*=g),a)for(var m=0;mg){p!=t.AFTER&&(p=t.AFTER,e.computeWorldVertices(o,h-6,4,c,0,2)),this.addAfterPosition(b-g,c,0,l,y);continue}for(;;_++){var S=v[_];if(!(b>S)){if(_==0)b/=S;else{var w=v[_-1];b=(b-w)/(S-w)}break}}_!=p&&(p=_,f&&_==d?(e.computeWorldVertices(o,h-4,4,c,0,2),e.computeWorldVertices(o,0,4,c,4,2)):e.computeWorldVertices(o,_*6+2,8,c,0,2)),this.addCurvePosition(b,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,y,n||m>0&&x==0)}return l}f?(h+=2,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h-4,c,0,2),e.computeWorldVertices(o,0,2,c,h-4,2),c[h-2]=c[0],c[h-1]=c[1]):(d--,h-=4,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h,c,0,2));for(var E=q.setArraySize(this.curves,d),T=0,A=c[0],O=c[1],P=0,k=0,M=0,B=0,j=0,z=0,J=0,Z=0,$=0,F=0,G=0,V=0,U=0,H=0,m=0,ee=2;mT){this.addAfterPosition(b-T,c,h-4,l,y);continue}for(;;_++){var ye=E[_];if(!(b>ye)){if(_==0)b/=ye;else{var w=E[_-1];b=(b-w)/(ye-w)}break}}if(_!=p){p=_;var oe=_*6;for(A=c[oe],O=c[oe+1],P=c[oe+2],k=c[oe+3],M=c[oe+4],B=c[oe+5],j=c[oe+6],z=c[oe+7],J=(A-P*2+M)*.03,Z=(O-k*2+B)*.03,$=((P-M)*3-A+j)*.006,F=((k-B)*3-O+z)*.006,G=J*2+$,V=Z*2+F,U=(P-A)*.3+J+$*.16666667,H=(k-O)*.3+Z+F*.16666667,ae=Math.sqrt(U*U+H*H),ie[0]=ae,oe=1;oe<8;oe++)U+=G,H+=V,G+=$,V+=F,ae+=Math.sqrt(U*U+H*H),ie[oe]=ae;U+=G,H+=V,ae+=Math.sqrt(U*U+H*H),ie[8]=ae,U+=G+$,H+=V+F,ae+=Math.sqrt(U*U+H*H),ie[9]=ae,pe=0}for(b*=ae;;pe++){var _e=ie[pe];if(!(b>_e)){if(pe==0)b/=_e;else{var w=ie[pe-1];b=pe+(b-w)/(_e-w)}break}}this.addCurvePosition(b*.1,A,O,P,k,M,B,j,z,l,y,n||m>0&&x==0)}return l},t.prototype.addBeforePosition=function(e,r,n,i,a){var o=r[n],s=r[n+1],u=r[n+2]-o,l=r[n+3]-s,c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addAfterPosition=function(e,r,n,i,a){var o=r[n+2],s=r[n+3],u=o-r[n],l=s-r[n+1],c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addCurvePosition=function(e,r,n,i,a,o,s,u,l,c,f,h){(e==0||isNaN(e))&&(e=1e-4);var d=e*e,p=d*e,v=1-e,g=v*v,m=g*v,y=v*e,_=y*3,x=v*_,b=_*e,S=r*m+i*x+o*b+u*p,w=n*m+a*x+s*b+l*p;c[f]=S,c[f+1]=w,h&&(c[f+2]=Math.atan2(w-(n*g+a*y*2+s*d),S-(r*g+i*y*2+o*d)))},t.NONE=-1,t.BEFORE=-2,t.AFTER=-3,t.epsilon=1e-5,t}(),s3=function(){function t(e,r){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new gf,this.active=!1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var n=0;n0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=(O.x-_.tx)*r,_.ty+=(O.y-_.ty)*r,y=!0}if(n>0){var P=Math.sqrt(_.a*_.a+_.b*_.b),k=Math.sqrt(s*s+l*l);P>1e-5&&(P=(P+(k-P+this.data.offsetScaleX)*n)/P),_.a*=P,_.b*=P,P=Math.sqrt(_.c*_.c+_.d*_.d),k=Math.sqrt(u*u+c*c),P>1e-5&&(P=(P+(k-P+this.data.offsetScaleY)*n)/P),_.c*=P,_.d*=P,y=!0}if(i>0){var b=_.c,w=_.d,M=Math.atan2(w,b),E=Math.atan2(c,u)-Math.atan2(l,s)-(M-Math.atan2(_.b,_.a));E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E=M+(E+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target,o=a.matrix,s=o.a,u=o.c,l=o.b,c=o.d,f=s*c-u*l>0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=O.x*r,_.ty+=O.y*r,y=!0}if(n>0){var P=(Math.sqrt(s*s+l*l)-1+this.data.offsetScaleX)*n+1;_.a*=P,_.b*=P,P=(Math.sqrt(u*u+c*c)-1+this.data.offsetScaleY)*n+1,_.c*=P,_.d*=P,y=!0}if(i>0){var E=Math.atan2(c,u)-Math.atan2(l,s);E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2);var b=_.c,w=_.d;E=Math.atan2(w,b)+(E-N.PI/2+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyAbsoluteLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(p>1e-5&&(p=(p+(a.ascaleX-p+this.data.offsetScaleX)*n)/p),v>1e-5&&(v=(v+(a.ascaleY-v+this.data.offsetScaleY)*n)/v));var g=l.ashearY;if(i>0){var f=a.ashearY-g+this.data.offsetShearY;f-=(16384-(16384.499999999996-f/360|0))*360,l.shearY+=f*i}l.updateWorldTransformWith(h,d,c,p,v,l.ashearX,g)}},t.prototype.applyRelativeLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(d>1e-5&&(d*=(a.ascaleX-1+this.data.offsetScaleX)*n+1),p>1e-5&&(p*=(a.ascaleY-1+this.data.offsetScaleY)*n+1));var v=l.ashearY;i>0&&(v+=(a.ashearY+this.data.offsetShearY)*i),l.updateWorldTransformWith(f,h,c,d,p,l.ashearX,v)}},t}(),l3=function(){function t(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,e==null)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var r=0;r1){var a=n[n.length-1];this._updateCache.indexOf(a)>-1||this.updateCacheReset.push(a)}this._updateCache.push(e),this.sortReset(i.children),n[n.length-1].sorted=!0}},t.prototype.sortPathConstraint=function(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||this.skin!=null&&q.contains(this.skin.constraints,e.data,!0)),!!e.active){var r=e.target,n=r.data.index,i=r.bone;this.skin!=null&&this.sortPathConstraintAttachment(this.skin,n,i),this.data.defaultSkin!=null&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,i);for(var a=0,o=this.data.skins.length;a-1||this.updateCacheReset.push(a)}else for(var i=0;i= 0.");if(r==null)throw new Error("name cannot be null.");if(n==null)throw new Error("boneData cannot be null.");this.index=e,this.name=r,this.boneData=n}return t}(),qw=function(t){Nt(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n.rotateMix=0,n.translateMix=0,n.scaleMix=0,n.shearMix=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return e}(vm),n1=function(){function t(e,r,n){this.slotIndex=e,this.name=r,this.attachment=n}return t}(),Op=function(){function t(e){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,e==null)throw new Error("name cannot be null.");this.name=e}return t.prototype.setAttachment=function(e,r,n){if(n==null)throw new Error("attachment cannot be null.");var i=this.attachments;e>=i.length&&(i.length=e+1),i[e]||(i[e]={}),i[e][r]=n},t.prototype.addSkin=function(e){for(var r=0;r0){for(var g=new Ol(Z),$=n.slots.length,l=0;l=0;h--)G[h]=-1;for(var V=q.newArray($-F,0),U=0,H=0,h=0;h=0;h--)G[h]==-1&&(G[h]=V[--H]);g.setFrame(l,y,G)}i.push(g),o=Math.max(o,g.frames[Z-1])}var ee=e.readInt(!0);if(ee>0){for(var g=new pm(ee),l=0;l=0;p--)ye[p]==-1&&(ye[p]=_e[--be])}h.setFrame(d++,this.getValue(pe,"time",0),ye)}a.push(h),o=Math.max(o,h.frames[h.getFrameCount()-1])}if(e.events){for(var h=new pm(e.events.length),d=0,p=0;p>1)*s;var u=r.bone.skeleton,l=r.attachmentVertices,c=this.vertices,f=this.bones;if(f==null){l.length>0&&(c=l);for(var h=r.bone.matrix,d=h.tx,p=h.ty,v=h.a,g=h.c,m=h.b,y=h.d,_=n,x=o;x0&&(r%=this.duration));for(var l=this.timelines,c=0,f=l.length;c>>1;;){if(e[(o+1)*n]<=r?i=o+1:a=o,i==a)return(i+1)*n;o=i+a>>>1}},t.linearSearch=function(e,r,n){for(var i=0,a=e.length-n;i<=a;i+=n)if(e[i]>r)return i;return-1},t}(),Fr;(function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"})(Fr||(Fr={}));var da=function(){function t(e){if(e<=0)throw new Error("frameCount must be > 0: "+e);this.curves=q.newFloatArray((e-1)*t.BEZIER_SIZE)}return t.prototype.getFrameCount=function(){return this.curves.length/t.BEZIER_SIZE+1},t.prototype.setLinear=function(e){this.curves[e*t.BEZIER_SIZE]=t.LINEAR},t.prototype.setStepped=function(e){this.curves[e*t.BEZIER_SIZE]=t.STEPPED},t.prototype.getCurveType=function(e){var r=e*t.BEZIER_SIZE;if(r==this.curves.length)return t.LINEAR;var n=this.curves[r];return n==t.LINEAR?t.LINEAR:n==t.STEPPED?t.STEPPED:t.BEZIER},t.prototype.setCurve=function(e,r,n,i,a){var o=(-r*2+i)*.03,s=(-n*2+a)*.03,u=((r-i)*3+1)*.006,l=((n-a)*3+1)*.006,c=o*2+u,f=s*2+l,h=r*.3+o+u*.16666667,d=n*.3+s+l*.16666667,p=e*t.BEZIER_SIZE,v=this.curves;v[p++]=t.BEZIER;for(var g=h,m=d,y=p+t.BEZIER_SIZE-1;p=r){var l=void 0,c=void 0;return i==s?(l=0,c=0):(l=n[i-2],c=n[i-1]),c+(n[i+1]-c)*(r-l)/(o-l)}var f=n[i-1];return f+(1-f)*(r-o)/(1-o)},t.LINEAR=0,t.STEPPED=1,t.BEZIER=2,t.BEZIER_SIZE=10*2-1,t}(),mi=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r<<1),n}return e.prototype.getPropertyId=function(){return(Fr.rotate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i){r<<=1,this.frames[r]=n,this.frames[r+e.ROTATION]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES]){var h=l[l.length+e.PREV_ROTATION];switch(s){case R.setup:c.rotation=c.data.rotation+h*o;break;case R.first:case R.replace:h+=c.data.rotation-c.rotation,h-=(16384-(16384.499999999996-h/360|0))*360;case R.add:c.rotation+=h*o}return}var d=yr.binarySearch(l,i,e.ENTRIES),p=l[d+e.PREV_ROTATION],v=l[d],g=this.getCurvePercent((d>>1)-1,1-(i-v)/(l[d+e.PREV_TIME]-v)),m=l[d+e.ROTATION]-p;switch(m=p+(m-(16384-(16384.499999999996-m/360|0))*360)*g,s){case R.setup:c.rotation=c.data.rotation+(m-(16384-(16384.499999999996-m/360|0))*360)*o;break;case R.first:case R.replace:m+=c.data.rotation-c.rotation;case R.add:c.rotation+=(m-(16384-(16384.499999999996-m/360|0))*360)*o}},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_ROTATION=-1,e.ROTATION=1,e}(da),Tf=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.translate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.X]=i,this.frames[r+e.Y]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=yr.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.X]-f)*v,h+=(l[d+e.Y]-h)*v}switch(s){case R.setup:c.x=c.data.x+f*o,c.y=c.data.y+h*o;break;case R.first:case R.replace:c.x+=(c.data.x+f-c.x)*o,c.y+=(c.data.y+h-c.y)*o;break;case R.add:c.x+=f*o,c.y+=h*o}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_X=-2,e.PREV_Y=-1,e.X=1,e.Y=2,e}(da),d3=function(t){tr(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Fr.scale<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X]*c.data.scaleX,h=l[l.length+e.PREV_Y]*c.data.scaleY;else{var d=yr.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=(f+(l[d+e.X]-f)*v)*c.data.scaleX,h=(h+(l[d+e.Y]-h)*v)*c.data.scaleY}if(o==1)s==R.add?(c.scaleX+=f-c.data.scaleX,c.scaleY+=h-c.data.scaleY):(c.scaleX=f,c.scaleY=h);else{var g=0,m=0;if(u==je.mixOut)switch(s){case R.setup:g=c.data.scaleX,m=c.data.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.first:case R.replace:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.add:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-c.data.scaleX)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-c.data.scaleY)*o}else switch(s){case R.setup:g=Math.abs(c.data.scaleX)*N.signum(f),m=Math.abs(c.data.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.first:case R.replace:g=Math.abs(c.scaleX)*N.signum(f),m=Math.abs(c.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.add:g=N.signum(f),m=N.signum(h),c.scaleX=Math.abs(c.scaleX)*g+(f-Math.abs(c.data.scaleX)*g)*o,c.scaleY=Math.abs(c.scaleY)*m+(h-Math.abs(c.data.scaleY)*m)*o}}},e}(Tf),p3=function(t){tr(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Fr.shear<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=yr.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=f+(l[d+e.X]-f)*v,h=h+(l[d+e.Y]-h)*v}switch(s){case R.setup:c.shearX=c.data.shearX+f*o,c.shearY=c.data.shearY+h*o;break;case R.first:case R.replace:c.shearX+=(c.data.shearX+f-c.shearX)*o,c.shearY+=(c.data.shearY+h-c.shearY)*o;break;case R.add:c.shearX+=f*o,c.shearY+=h*o}},e}(Tf),i1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.color<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex],c=this.frames;if(i=c[c.length-e.ENTRIES]){var m=c.length;d=c[m+e.PREV_R],p=c[m+e.PREV_G],v=c[m+e.PREV_B],g=c[m+e.PREV_A]}else{var y=yr.binarySearch(c,i,e.ENTRIES);d=c[y+e.PREV_R],p=c[y+e.PREV_G],v=c[y+e.PREV_B],g=c[y+e.PREV_A];var _=c[y],x=this.getCurvePercent(y/e.ENTRIES-1,1-(i-_)/(c[y+e.PREV_TIME]-_));d+=(c[y+e.R]-d)*x,p+=(c[y+e.G]-p)*x,v+=(c[y+e.B]-v)*x,g+=(c[y+e.A]-g)*x}if(o==1)l.color.set(d,p,v,g);else{var f=l.color;s==R.setup&&f.setFromColor(l.data.color),f.add((d-f.r)*o,(p-f.g)*o,(v-f.b)*o,(g-f.a)*o)}},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_R=-4,e.PREV_G=-3,e.PREV_B=-2,e.PREV_A=-1,e.R=1,e.G=2,e.B=3,e.A=4,e}(da),a1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.twoColor<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s,u,l,c){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s,this.frames[r+e.R2]=u,this.frames[r+e.G2]=l,this.frames[r+e.B2]=c},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex],c=this.frames;if(i=c[c.length-e.ENTRIES]){var S=c.length;v=c[S+e.PREV_R],g=c[S+e.PREV_G],m=c[S+e.PREV_B],y=c[S+e.PREV_A],_=c[S+e.PREV_R2],x=c[S+e.PREV_G2],b=c[S+e.PREV_B2]}else{var w=yr.binarySearch(c,i,e.ENTRIES);v=c[w+e.PREV_R],g=c[w+e.PREV_G],m=c[w+e.PREV_B],y=c[w+e.PREV_A],_=c[w+e.PREV_R2],x=c[w+e.PREV_G2],b=c[w+e.PREV_B2];var E=c[w],T=this.getCurvePercent(w/e.ENTRIES-1,1-(i-E)/(c[w+e.PREV_TIME]-E));v+=(c[w+e.R]-v)*T,g+=(c[w+e.G]-g)*T,m+=(c[w+e.B]-m)*T,y+=(c[w+e.A]-y)*T,_+=(c[w+e.R2]-_)*T,x+=(c[w+e.G2]-x)*T,b+=(c[w+e.B2]-b)*T}if(o==1)l.color.set(v,g,m,y),l.darkColor.set(_,x,b,1);else{var f=l.color,h=l.darkColor;s==R.setup&&(f.setFromColor(l.data.color),h.setFromColor(l.data.darkColor)),f.add((v-f.r)*o,(g-f.g)*o,(m-f.b)*o,(y-f.a)*o),h.add((_-h.r)*o,(x-h.g)*o,(b-h.b)*o,0)}},e.ENTRIES=8,e.PREV_TIME=-8,e.PREV_R=-7,e.PREV_G=-6,e.PREV_B=-5,e.PREV_A=-4,e.PREV_R2=-3,e.PREV_G2=-2,e.PREV_B2=-1,e.R=1,e.G=2,e.B=3,e.A=4,e.R2=5,e.G2=6,e.B2=7,e}(da),Rp=function(){function t(e){this.frames=q.newFloatArray(e),this.attachmentNames=new Array(e)}return t.prototype.getPropertyId=function(){return(Fr.attachment<<24)+this.slotIndex},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.attachmentNames[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.slots[this.slotIndex];if(s==je.mixOut&&o==R.setup){var l=u.data.attachmentName;u.setAttachment(l==null?null:e.getAttachment(this.slotIndex,l));return}var c=this.frames;if(n=c[c.length-1]?h=c.length-1:h=yr.binarySearch(c,n,1)-1;var d=this.attachmentNames[h];e.slots[this.slotIndex].setAttachment(d==null?null:e.getAttachment(this.slotIndex,d))},t}(),mO=null,v3=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r),n.frameVertices=new Array(r),mO==null&&(mO=q.newFloatArray(64)),n}return e.prototype.getPropertyId=function(){return(Fr.deform<<27)+ +this.attachment.id+this.slotIndex},e.prototype.setFrame=function(r,n,i){this.frames[r]=n,this.frameVertices[r]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex],c=l.getAttachment();if(!(!(c instanceof Ns)||!c.applyDeform(this.attachment))){var f=l.attachmentVertices;f.length==0&&(s=R.setup);var h=this.frameVertices,d=h[0].length,p=this.frames;if(i=p[p.length-1]){var x=h[p.length-1];if(o==1)if(s==R.add){var v=c;if(v.bones==null)for(var m=v.vertices,y=0;yn)this.apply(e,r,Number.MAX_VALUE,i,a,o,s),r=-1;else if(r>=u[l-1])return;if(!(n0&&u[c-1]==f;)c--}for(;c=u[c];c++)i.push(this.events[c])}}},t}(),Ip=function(){function t(e){this.frames=q.newFloatArray(e),this.drawOrders=new Array(e)}return t.prototype.getPropertyId=function(){return Fr.drawOrder<<24},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.drawOrders[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.drawOrder,l=e.slots;if(s==je.mixOut&&o==R.setup){q.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length);return}var c=this.frames;if(n=c[c.length-1]?f=c.length-1:f=yr.binarySearch(c,n)-1;var h=this.drawOrders[f];if(h==null)q.arrayCopy(l,0,u,0,l.length);else for(var d=0,p=h.length;d=l[l.length-e.ENTRIES]){s==R.setup?(c.mix=c.data.mix+(l[l.length+e.PREV_MIX]-c.data.mix)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0)):(c.mix+=(l[l.length+e.PREV_MIX]-c.mix)*o,u==je.mixIn&&(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0));return}var f=yr.binarySearch(l,i,e.ENTRIES),h=l[f+e.PREV_MIX],d=l[f],p=this.getCurvePercent(f/e.ENTRIES-1,1-(i-d)/(l[f+e.PREV_TIME]-d));s==R.setup?(c.mix=c.data.mix+(h+(l[f+e.MIX]-h)*p-c.data.mix)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0)):(c.mix+=(h+(l[f+e.MIX]-h)*p-c.mix)*o,u==je.mixIn&&(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0))},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_MIX=-4,e.PREV_BEND_DIRECTION=-3,e.PREV_COMPRESS=-2,e.PREV_STRETCH=-1,e.MIX=1,e.BEND_DIRECTION=2,e.COMPRESS=3,e.STRETCH=4,e}(da),s1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.transformConstraint<<24)+this.transformConstraintIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a,this.frames[r+e.SCALE]=o,this.frames[r+e.SHEAR]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.transformConstraints[this.transformConstraintIndex];if(i=l[l.length-e.ENTRIES]){var g=l.length;h=l[g+e.PREV_ROTATE],d=l[g+e.PREV_TRANSLATE],p=l[g+e.PREV_SCALE],v=l[g+e.PREV_SHEAR]}else{var m=yr.binarySearch(l,i,e.ENTRIES);h=l[m+e.PREV_ROTATE],d=l[m+e.PREV_TRANSLATE],p=l[m+e.PREV_SCALE],v=l[m+e.PREV_SHEAR];var y=l[m],_=this.getCurvePercent(m/e.ENTRIES-1,1-(i-y)/(l[m+e.PREV_TIME]-y));h+=(l[m+e.ROTATE]-h)*_,d+=(l[m+e.TRANSLATE]-d)*_,p+=(l[m+e.SCALE]-p)*_,v+=(l[m+e.SHEAR]-v)*_}if(s==R.setup){var f=c.data;c.rotateMix=f.rotateMix+(h-f.rotateMix)*o,c.translateMix=f.translateMix+(d-f.translateMix)*o,c.scaleMix=f.scaleMix+(p-f.scaleMix)*o,c.shearMix=f.shearMix+(v-f.shearMix)*o}else c.rotateMix+=(h-c.rotateMix)*o,c.translateMix+=(d-c.translateMix)*o,c.scaleMix+=(p-c.scaleMix)*o,c.shearMix+=(v-c.shearMix)*o},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_ROTATE=-4,e.PREV_TRANSLATE=-3,e.PREV_SCALE=-2,e.PREV_SHEAR=-1,e.ROTATE=1,e.TRANSLATE=2,e.SCALE=3,e.SHEAR=4,e}(da),kp=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.pathConstraintPosition<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.VALUE]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=yr.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.position=c.data.position+(f-c.data.position)*o:c.position+=(f-c.position)*o},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_VALUE=-1,e.VALUE=1,e}(da),g3=function(t){tr(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Fr.pathConstraintSpacing<<24)+this.pathConstraintIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=yr.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*o:c.spacing+=(f-c.spacing)*o},e}(kp),l1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.pathConstraintMix<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_ROTATE],h=l[l.length+e.PREV_TRANSLATE];else{var d=yr.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_ROTATE],h=l[d+e.PREV_TRANSLATE];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.ROTATE]-f)*v,h+=(l[d+e.TRANSLATE]-h)*v}s==R.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*o,c.translateMix=c.data.translateMix+(h-c.data.translateMix)*o):(c.rotateMix+=(f-c.rotateMix)*o,c.translateMix+=(h-c.translateMix)*o)},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_ROTATE=-2,e.PREV_TRANSLATE=-1,e.ROTATE=1,e.TRANSLATE=2,e}(da),y3=function(){function t(e){this.tracks=new Array,this.events=new Array,this.listeners=new Array,this.queue=new x3(this),this.propertyIDs=new HD,this.animationsChanged=!1,this.timeScale=1,this.trackEntryPool=new hm(function(){return new _3}),this.data=e}return t.prototype.update=function(e){e*=this.timeScale;for(var r=this.tracks,n=0,i=r.length;n0){if(a.delay-=o,a.delay>0)continue;o=-a.delay,a.delay=0}var s=a.next;if(s!=null){var u=a.trackLast-s.delay;if(u>=0){for(s.delay=0,s.trackTime=a.timeScale==0?0:(u/a.timeScale+e)*s.timeScale,a.trackTime+=o,this.setCurrent(n,s,!0);s.mixingFrom!=null;)s.mixTime+=e,s=s.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&a.mixingFrom==null){r[n]=null,this.queue.end(a),this.disposeNext(a);continue}if(a.mixingFrom!=null&&this.updateMixingFrom(a,e)){var l=a.mixingFrom;for(a.mixingFrom=null,l!=null&&(l.mixingTo=null);l!=null;)this.queue.end(l),l=l.mixingFrom}a.trackTime+=o}}this.queue.drain()},t.prototype.updateMixingFrom=function(e,r){var n=e.mixingFrom;if(n==null)return!0;var i=this.updateMixingFrom(n,r);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.mixTime>0&&e.mixTime>=e.mixDuration?((n.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=n.mixingFrom,n.mixingFrom!=null&&(n.mixingFrom.mixingTo=e),e.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=r*n.timeScale,e.mixTime+=r,!1)},t.prototype.apply=function(e){if(e==null)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,n=this.tracks,i=!1,a=0,o=n.length;a0)){i=!0;var u=a==0?R.first:s.mixBlend,l=s.alpha;s.mixingFrom!=null?l*=this.applyMixingFrom(s,e,u):s.trackTime>=s.trackEnd&&s.next==null&&(l=0);var c=s.animationLast,f=s.getAnimationTime(),h=s.animation.timelines.length,d=s.animation.timelines;if(a==0&&l==1||u==R.add)for(var p=0;p1&&(a=1),n!=R.first&&(n=i.mixBlend));var o=a0&&this.queueEvents(i,c),this.events.length=0,i.nextAnimationLast=c,i.nextTrackLast=i.trackTime,a},t.prototype.applyRotateTimeline=function(e,r,n,i,a,o,s,u){if(u&&(o[s]=0),i==1){e.apply(r,0,n,null,1,a,je.mixIn);return}var l=e,c=l.frames,f=r.bones[l.boneIndex],h=0,d=0;if(n=c[c.length-mi.ENTRIES])d=f.data.rotation+c[c.length+mi.PREV_ROTATION];else{var p=yr.binarySearch(c,n,mi.ENTRIES),v=c[p+mi.PREV_ROTATION],g=c[p],m=l.getCurvePercent((p>>1)-1,1-(n-g)/(c[p+mi.PREV_TIME]-g));d=c[p+mi.ROTATION]-v,d-=(16384-(16384.499999999996-d/360|0))*360,d=v+d*m+f.data.rotation,d-=(16384-(16384.499999999996-d/360|0))*360}var y=0,_=d-h;if(_-=(16384-(16384.499999999996-_/360|0))*360,_==0)y=o[s];else{var x=0,b=0;u?(x=0,b=_):(x=o[s],b=o[s+1]);var S=_>0,w=x>=0;N.signum(b)!=N.signum(_)&&Math.abs(b)<=90&&(Math.abs(x)>180&&(x+=360*N.signum(x)),w=S),y=_+x-x%360,w!=S&&(y+=360*N.signum(x)),o[s]=y}o[s+1]=_,h+=y*i,f.rotation=h-(16384-(16384.499999999996-h/360|0))*360},t.prototype.queueEvents=function(e,r){for(var n=e.animationStart,i=e.animationEnd,a=i-n,o=e.trackLast%a,s=this.events,u=0,l=s.length;ui||this.queue.event(e,c)}var f=!1;for(e.loop?f=a==0||o>e.trackTime%a:f=r>=i&&e.animationLast=this.tracks.length)){var r=this.tracks[e];if(r!=null){this.queue.end(r),this.disposeNext(r);for(var n=r;;){var i=n.mixingFrom;if(i==null)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[r.trackIndex]=null,this.queue.drain()}}},t.prototype.setCurrent=function(e,r,n){var i=this.expandToIndex(e);this.tracks[e]=r,i!=null&&(n&&this.queue.interrupt(i),r.mixingFrom=i,i.mixingTo=r,r.mixTime=0,i.mixingFrom!=null&&i.mixDuration>0&&(r.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(r)},t.prototype.setAnimation=function(e,r,n){var i=this.data.skeletonData.findAnimation(r);if(i==null)throw new Error("Animation not found: "+r);return this.setAnimationWith(e,i,n)},t.prototype.setAnimationWith=function(e,r,n){if(r==null)throw new Error("animation cannot be null.");var i=!0,a=this.expandToIndex(e);a!=null&&(a.nextTrackLast==-1?(this.tracks[e]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.disposeNext(a),a=a.mixingFrom,i=!1):this.disposeNext(a));var o=this.trackEntry(e,r,n,a);return this.setCurrent(e,o,i),this.queue.drain(),o},t.prototype.addAnimation=function(e,r,n,i){var a=this.data.skeletonData.findAnimation(r);if(a==null)throw new Error("Animation not found: "+r);return this.addAnimationWith(e,a,n,i)},t.prototype.addAnimationWith=function(e,r,n,i){if(r==null)throw new Error("animation cannot be null.");var a=this.expandToIndex(e);if(a!=null)for(;a.next!=null;)a=a.next;var o=this.trackEntry(e,r,n,a);if(a==null)this.setCurrent(e,o,!0),this.queue.drain();else if(a.next=o,i<=0){var s=a.animationEnd-a.animationStart;s!=0?(a.loop?i+=s*(1+(a.trackTime/s|0)):i+=Math.max(s,a.trackTime),i-=this.data.getMix(a.animation,r)):i=a.trackTime}return o.delay=i,o},t.prototype.setEmptyAnimation=function(e,r){var n=this.setAnimationWith(e,t.emptyAnimation,!1);return n.mixDuration=r,n.trackEnd=r,n},t.prototype.addEmptyAnimation=function(e,r,n){n<=0&&(n-=r);var i=this.addAnimationWith(e,t.emptyAnimation,!1,n);return i.mixDuration=r,i.trackEnd=r,i},t.prototype.setEmptyAnimations=function(e){var r=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n0){a[u]=t.HOLD_MIX,o[u]=c;continue e}break}a[u]=t.HOLD}}},t.prototype.hasTimeline=function(e,r){for(var n=e.animation.timelines,i=0,a=n.length;i=this.tracks.length?null:this.tracks[e]},t.prototype.addListener=function(e){if(e==null)throw new Error("listener cannot be null.");this.listeners.push(e)},t.prototype.removeListener=function(e){var r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)},t.prototype.clearListeners=function(){this.listeners.length=0},t.prototype.clearListenerNotifications=function(){this.queue.clear()},t.prototype.setAnimationByName=function(e,r,n){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(e,r,n)},t.prototype.addAnimationByName=function(e,r,n,i){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(e,r,n,i)},t.prototype.hasAnimation=function(e){var r=this.data.skeletonData.findAnimation(e);return r!==null},t.prototype.hasAnimationByName=function(e){return t.deprecatedWarning3||(t.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(e)},t.emptyAnimation=new yr("",[],0),t.SUBSEQUENT=0,t.FIRST=1,t.HOLD=2,t.HOLD_MIX=3,t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),_3=function(){function t(){this.mixBlend=R.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return t.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},t.prototype.getAnimationTime=function(){if(this.loop){var e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},t.prototype.setAnimationLast=function(e){this.animationLast=e,this.nextAnimationLast=e},t.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},t.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},Object.defineProperty(t.prototype,"time",{get:function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime},set:function(e){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endTime",{get:function(){return t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime},set:function(e){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),t.prototype.loopsCount=function(){return Math.floor(this.trackTime/this.trackEnd)},t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t}(),x3=function(){function t(e){this.objects=[],this.drainDisabled=!1,this.animState=e}return t.prototype.start=function(e){this.objects.push(sn.start),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.interrupt=function(e){this.objects.push(sn.interrupt),this.objects.push(e)},t.prototype.end=function(e){this.objects.push(sn.end),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.dispose=function(e){this.objects.push(sn.dispose),this.objects.push(e)},t.prototype.complete=function(e){this.objects.push(sn.complete),this.objects.push(e)},t.prototype.event=function(e,r){this.objects.push(sn.event),this.objects.push(e),this.objects.push(r)},t.prototype.deprecateStuff=function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'")),!0},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var e=this.objects,r=this.animState.listeners,n=0;n1e-4?(S=Math.abs(p*m-v*g)/S,v=g*S,m=p*S,w=Math.atan2(g,p)*N.radDeg):(p=0,g=0,w=90-Math.atan2(m,v)*N.radDeg);var E=n+o-w,T=n+s-w+90,y=N.cosDeg(E)*i,_=N.cosDeg(T)*a,x=N.sinDeg(E)*i,b=N.sinDeg(T)*a;l.a=p*y-v*x,l.c=p*_-v*b,l.b=g*y+m*x,l.d=g*_+m*b;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,k=(g*A+m*O)/f,S=Math.sqrt(P*P+k*k);S>1e-5&&(S=1/S),P*=S,k*=S,S=Math.sqrt(P*P+k*k),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY>0)&&(S=-S);var M=Math.PI/2+Math.atan2(k,P),B=Math.cos(M)*S,j=Math.sin(M)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,x=N.sinDeg(o)*i,b=N.sinDeg(90+s)*a;l.a=P*y+B*x,l.c=P*_+B*b,l.b=k*y+j*x,l.d=k*_+j*b;break}}l.a*=c,l.c*=c,l.b*=f,l.d*=f},t.prototype.setToSetupPose=function(){var e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY},t.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*N.radDeg},t.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*N.radDeg},t.prototype.getWorldScaleX=function(){var e=this.matrix;return Math.sqrt(e.a*e.a+e.c*e.c)},t.prototype.getWorldScaleY=function(){var e=this.matrix;return Math.sqrt(e.b*e.b+e.d*e.d)},t.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent,r=this.matrix;if(e==null){this.ax=r.tx,this.ay=r.ty,this.arotation=Math.atan2(r.b,r.a)*N.radDeg,this.ascaleX=Math.sqrt(r.a*r.a+r.b*r.b),this.ascaleY=Math.sqrt(r.c*r.c+r.d*r.d),this.ashearX=0,this.ashearY=Math.atan2(r.a*r.c+r.b*r.d,r.a*r.d-r.b*r.c)*N.radDeg;return}var n=e.matrix,i=1/(n.a*n.d-n.b*n.c),a=r.tx-n.tx,o=r.ty-n.ty;this.ax=a*n.d*i-o*n.c*i,this.ay=o*n.a*i-a*n.b*i;var s=i*n.d,u=i*n.a,l=i*n.c,c=i*n.b,f=s*r.a-l*r.b,h=s*r.c-l*r.d,d=u*r.b-c*r.a,p=u*r.d-c*r.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+d*d),this.ascaleX>1e-4){var v=f*p-h*d;this.ascaleY=v/this.ascaleX,this.ashearY=Math.atan2(f*h+d*p,v)*N.radDeg,this.arotation=Math.atan2(d,f)*N.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(h*h+p*p),this.ashearY=0,this.arotation=90-Math.atan2(p,h)*N.radDeg},t.prototype.worldToLocal=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=1/(n*o-i*a),u=e.x-r.tx,l=e.y-r.ty;return e.x=u*o*s-l*i*s,e.y=l*n*s-u*a*s,e},t.prototype.localToWorld=function(e){var r=this.matrix,n=e.x,i=e.y;return e.x=n*r.a+i*r.c+r.tx,e.y=n*r.b+i*r.d+r.ty,e},t.prototype.worldToLocalRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(i.a*r-i.b*n,i.d*n-i.c*r)*N.radDeg},t.prototype.localToWorldRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(n*i.b+r*i.d,n*i.a+r*i.c)*N.radDeg},t.prototype.rotateWorld=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=N.cosDeg(e),u=N.sinDeg(e);r.a=s*n-u*a,r.c=s*i-u*o,r.b=u*n+s*a,r.d=u*i+s*o,this.appliedValid=!1},t}(),w3=function(){function t(e,r,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=Fe.Normal,e<0)throw new Error("index must be >= 0.");if(r==null)throw new Error("name cannot be null.");this.index=e,this.name=r,this.parent=n}return t}(),E3=function(){function t(e,r){if(r==null)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),T3=function(){function t(e){this.name=e}return t}(),A3=function(){function t(e,r){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.mix=e.mix,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch,this.bones=new Array;for(var n=0;n180?p-=360:p<-180&&(p+=360);var v=e.ascaleX,g=e.ascaleY;if(i||a){var m=e.data.length*v,y=Math.sqrt(h*h+d*d);if(i&&ym&&m>1e-4){var _=(y/m-1)*s+1;v*=_,o&&(g*=_)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+p*s,v,g,e.ashearX,e.ashearY)},t.prototype.apply2=function(e,r,n,i,a,o,s){if(s==0){r.updateWorldTransform();return}e.appliedValid||e.updateAppliedTransform(),r.appliedValid||r.updateAppliedTransform();var u=e.ax,l=e.ay,c=e.ascaleX,f=c,h=e.ascaleY,d=r.ascaleX,p=e.matrix,v=0,g=0,m=0;c<0?(c=-c,v=180,m=-1):(v=0,m=1),h<0&&(h=-h,m=-m),d<0?(d=-d,g=180):g=0;var y=r.ax,_=0,x=0,b=0,S=p.a,w=p.c,E=p.b,T=p.d,A=Math.abs(c-h)<=1e-4;A?(_=r.ay,x=S*y+w*_+p.tx,b=E*y+T*_+p.ty):(_=0,x=S*y+p.tx,b=E*y+p.ty);var O=e.parent.matrix;S=O.a,w=O.c,E=O.b,T=O.d;var P=1/(S*T-w*E),k=n-O.tx,M=i-O.ty,B=(k*T-M*w)*P-u,j=(M*S-k*E)*P-l,z=B*B+j*j;k=x-O.tx,M=b-O.ty;var J=(k*T-M*w)*P-u,Z=(M*S-k*E)*P-l,$=Math.sqrt(J*J+Z*Z),F=r.data.length*d,G=0,V=0;e:if(A){F*=c;var U=(z-$*$-F*F)/(2*$*F);U<-1?U=-1:U>1&&(U=1,o&&$+F>1e-4&&(f*=(Math.sqrt(z)/($+F)-1)*s+1)),V=Math.acos(U)*a,S=$+F*U,w=F*Math.sin(V),G=Math.atan2(j*S-B*w,B*S+j*w)}else{S=c*F,w=h*F;var H=S*S,ee=w*w,ie=Math.atan2(j,B);E=ee*$*$+H*z-H*ee;var ae=-2*ee*$,pe=ee-H;if(T=ae*ae-4*pe*E,T>=0){var ye=Math.sqrt(T);ae<0&&(ye=-ye),ye=-(ae+ye)/2;var oe=ye/pe,_e=E/ye,Ce=Math.abs(oe)=-1&&E<=1&&(E=Math.acos(E),k=S*Math.cos(E)+$,M=w*Math.sin(E),T=k*k+M*M,TEt&&(Xe=E,Et=T,tt=k,$t=M)),z<=(ke+Et)/2?(G=ie-Math.atan2(we*a,Oe),V=be*a):(G=ie-Math.atan2($t*a,tt),V=Xe*a)}var Ht=Math.atan2(_,y)*m,_t=e.arotation;G=(G-Ht)*N.radDeg+v-_t,G>180?G-=360:G<-180&&(G+=360),e.updateWorldTransformWith(u,l,_t+G*s,f,e.ascaleY,0,0),_t=r.arotation,V=((V+Ht)*N.radDeg-r.ashearX)*m+g-_t,V>180?V-=360:V<-180&&(V+=360),r.updateWorldTransformWith(y,_,_t+V*s,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),C3=function(){function t(e){this.order=0,this.bones=new Array,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.name=e}return t}(),P3=function(){function t(e){this.order=0,this.bones=new Array,this.name=e}return t}(),Hn;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"})(Hn||(Hn={}));var O3=function(){function t(e,r){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var n=0,i=e.bones.length;n0,a=r>0;if(!(!i&&!a)){var o=this.data,s=o.spacingMode,u=s==Hn.Length,l=o.rotateMode,c=l==zt.Tangent,f=l==zt.ChainScale,h=this.bones.length,d=c?h:h+1,p=this.bones,v=q.setArraySize(this.spaces,d),g=null,m=this.spacing;if(f||u){f&&(g=q.setArraySize(this.lengths,h));for(var y=0,_=d-1;y<_;){var x=p[y],b=x.data.length;if(b0?N.degRad:-N.degRad}for(var y=0,M=3;yN.PI?U-=N.PI2:U<-N.PI&&(U+=N.PI2),U*=r,H=Math.cos(U),ee=Math.sin(U),B.a=H*$-ee*G,B.c=H*F-ee*V,B.b=ee*$+H*G,B.d=ee*F+H*V}x.appliedValid=!1}}}},t.prototype.computeWorldPositions=function(e,r,n,i,a){var o=this.target,s=this.position,u=this.spaces,l=q.setArraySize(this.positions,r*3+2),c=null,f=e.closed,h=e.worldVerticesLength,d=h/6,p=t.NONE;if(!e.constantSpeed){var v=e.lengths;d-=f?1:2;var g=v[d];if(i&&(s*=g),a)for(var m=0;mg){p!=t.AFTER&&(p=t.AFTER,e.computeWorldVertices(o,h-6,4,c,0,2)),this.addAfterPosition(b-g,c,0,l,y);continue}for(;;_++){var S=v[_];if(!(b>S)){if(_==0)b/=S;else{var w=v[_-1];b=(b-w)/(S-w)}break}}_!=p&&(p=_,f&&_==d?(e.computeWorldVertices(o,h-4,4,c,0,2),e.computeWorldVertices(o,0,4,c,4,2)):e.computeWorldVertices(o,_*6+2,8,c,0,2)),this.addCurvePosition(b,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,y,n||m>0&&x==0)}return l}f?(h+=2,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h-4,c,0,2),e.computeWorldVertices(o,0,2,c,h-4,2),c[h-2]=c[0],c[h-1]=c[1]):(d--,h-=4,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h,c,0,2));for(var E=q.setArraySize(this.curves,d),T=0,A=c[0],O=c[1],P=0,k=0,M=0,B=0,j=0,z=0,J=0,Z=0,$=0,F=0,G=0,V=0,U=0,H=0,m=0,ee=2;mT){this.addAfterPosition(b-T,c,h-4,l,y);continue}for(;;_++){var ye=E[_];if(!(b>ye)){if(_==0)b/=ye;else{var w=E[_-1];b=(b-w)/(ye-w)}break}}if(_!=p){p=_;var oe=_*6;for(A=c[oe],O=c[oe+1],P=c[oe+2],k=c[oe+3],M=c[oe+4],B=c[oe+5],j=c[oe+6],z=c[oe+7],J=(A-P*2+M)*.03,Z=(O-k*2+B)*.03,$=((P-M)*3-A+j)*.006,F=((k-B)*3-O+z)*.006,G=J*2+$,V=Z*2+F,U=(P-A)*.3+J+$*.16666667,H=(k-O)*.3+Z+F*.16666667,ae=Math.sqrt(U*U+H*H),ie[0]=ae,oe=1;oe<8;oe++)U+=G,H+=V,G+=$,V+=F,ae+=Math.sqrt(U*U+H*H),ie[oe]=ae;U+=G,H+=V,ae+=Math.sqrt(U*U+H*H),ie[8]=ae,U+=G+$,H+=V+F,ae+=Math.sqrt(U*U+H*H),ie[9]=ae,pe=0}for(b*=ae;;pe++){var _e=ie[pe];if(!(b>_e)){if(pe==0)b/=_e;else{var w=ie[pe-1];b=pe+(b-w)/(_e-w)}break}}this.addCurvePosition(b*.1,A,O,P,k,M,B,j,z,l,y,n||m>0&&x==0)}return l},t.prototype.addBeforePosition=function(e,r,n,i,a){var o=r[n],s=r[n+1],u=r[n+2]-o,l=r[n+3]-s,c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addAfterPosition=function(e,r,n,i,a){var o=r[n+2],s=r[n+3],u=o-r[n],l=s-r[n+1],c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addCurvePosition=function(e,r,n,i,a,o,s,u,l,c,f,h){(e==0||isNaN(e))&&(e=1e-4);var d=e*e,p=d*e,v=1-e,g=v*v,m=g*v,y=v*e,_=y*3,x=v*_,b=_*e,S=r*m+i*x+o*b+u*p,w=n*m+a*x+s*b+l*p;c[f]=S,c[f+1]=w,h&&(c[f+2]=Math.atan2(w-(n*g+a*y*2+s*d),S-(r*g+i*y*2+o*d)))},t.prototype.getOrder=function(){return this.data.order},t.NONE=-1,t.BEFORE=-2,t.AFTER=-3,t.epsilon=1e-5,t}(),R3=function(){function t(e,r){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new gf,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var n=0;n0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=(O.x-_.tx)*r,_.ty+=(O.y-_.ty)*r,y=!0}if(n>0){var P=Math.sqrt(_.a*_.a+_.b*_.b),k=Math.sqrt(s*s+l*l);P>1e-5&&(P=(P+(k-P+this.data.offsetScaleX)*n)/P),_.a*=P,_.b*=P,P=Math.sqrt(_.c*_.c+_.d*_.d),k=Math.sqrt(u*u+c*c),P>1e-5&&(P=(P+(k-P+this.data.offsetScaleY)*n)/P),_.c*=P,_.d*=P,y=!0}if(i>0){var b=_.c,w=_.d,M=Math.atan2(w,b),E=Math.atan2(c,u)-Math.atan2(l,s)-(M-Math.atan2(_.b,_.a));E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E=M+(E+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target,o=a.matrix,s=o.a,u=o.c,l=o.b,c=o.d,f=s*c-u*l>0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=O.x*r,_.ty+=O.y*r,y=!0}if(n>0){var P=(Math.sqrt(s*s+l*l)-1+this.data.offsetScaleX)*n+1;_.a*=P,_.b*=P,P=(Math.sqrt(u*u+c*c)-1+this.data.offsetScaleY)*n+1,_.c*=P,_.d*=P,y=!0}if(i>0){var E=Math.atan2(c,u)-Math.atan2(l,s);E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2);var b=_.c,w=_.d;E=Math.atan2(w,b)+(E-N.PI/2+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyAbsoluteLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(p>1e-5&&(p=(p+(a.ascaleX-p+this.data.offsetScaleX)*n)/p),v>1e-5&&(v=(v+(a.ascaleY-v+this.data.offsetScaleY)*n)/v));var g=l.ashearY;if(i>0){var f=a.ashearY-g+this.data.offsetShearY;f-=(16384-(16384.499999999996-f/360|0))*360,l.shearY+=f*i}l.updateWorldTransformWith(h,d,c,p,v,l.ashearX,g)}},t.prototype.applyRelativeLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(d>1e-5&&(d*=(a.ascaleX-1+this.data.offsetScaleX)*n+1),p>1e-5&&(p*=(a.ascaleY-1+this.data.offsetScaleY)*n+1));var v=l.ashearY;i>0&&(v+=(a.ashearY+this.data.offsetShearY)*i),l.updateWorldTransformWith(f,h,c,d,p,l.ashearX,v)}},t.prototype.getOrder=function(){return this.data.order},t}(),I3=function(){function t(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,e==null)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var r=0;r1){var a=n[n.length-1];this._updateCache.indexOf(a)>-1||this.updateCacheReset.push(a)}this._updateCache.push(e),this.sortReset(i.children),n[n.length-1].sorted=!0},t.prototype.sortPathConstraint=function(e){var r=e.target,n=r.data.index,i=r.bone;this.skin!=null&&this.sortPathConstraintAttachment(this.skin,n,i),this.data.defaultSkin!=null&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,i);for(var a=0,o=this.data.skins.length;a-1||this.updateCacheReset.push(a)}else for(var i=0;i= 0.");if(r==null)throw new Error("name cannot be null.");if(n==null)throw new Error("boneData cannot be null.");this.index=e,this.name=r,this.boneData=n}return t}(),F3=function(){function t(e){if(this.order=0,this.bones=new Array,this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1,e==null)throw new Error("name cannot be null.");this.name=e}return t}(),N3=function(){function t(e){if(this.attachments=new Array,e==null)throw new Error("name cannot be null.");this.name=e}return t.prototype.addAttachment=function(e,r,n){if(n==null)throw new Error("attachment cannot be null.");var i=this.attachments;e>=i.length&&(i.length=e+1),i[e]||(i[e]={}),i[e][r]=n},t.prototype.getAttachment=function(e,r){var n=this.attachments[e];return n?n[r]:null},t.prototype.attachAll=function(e,r){for(var n=0,i=0;i=0;p--)pe[p]==-1&&(pe[p]=oe[--Ce])}h.setFrame(d++,ae.time,pe)}a.push(h),o=Math.max(o,h.frames[h.getFrameCount()-1])}if(e.events){for(var h=new m3(e.events.length),d=0,p=0;p>1)*s;var u=r.bone.skeleton,l=r.attachmentVertices,c=this.vertices,f=this.bones;if(f==null){l.length>0&&(c=l);for(var h=r.bone.matrix,d=h.tx,p=h.ty,v=h.a,g=h.c,m=h.b,y=h.d,_=n,x=o;x0&&(r%=this.duration));for(var l=this.timelines,c=0,f=l.length;c>>1;;){if(e[(o+1)*n]<=r?i=o+1:a=o,i==a)return(i+1)*n;o=i+a>>>1}},t.linearSearch=function(e,r,n){for(var i=0,a=e.length-n;i<=a;i+=n)if(e[i]>r)return i;return-1},t}(),Fr;(function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"})(Fr||(Fr={}));var da=function(){function t(e){if(e<=0)throw new Error("frameCount must be > 0: "+e);this.curves=q.newFloatArray((e-1)*t.BEZIER_SIZE)}return t.prototype.getFrameCount=function(){return this.curves.length/t.BEZIER_SIZE+1},t.prototype.setLinear=function(e){this.curves[e*t.BEZIER_SIZE]=t.LINEAR},t.prototype.setStepped=function(e){this.curves[e*t.BEZIER_SIZE]=t.STEPPED},t.prototype.getCurveType=function(e){var r=e*t.BEZIER_SIZE;if(r==this.curves.length)return t.LINEAR;var n=this.curves[r];return n==t.LINEAR?t.LINEAR:n==t.STEPPED?t.STEPPED:t.BEZIER},t.prototype.setCurve=function(e,r,n,i,a){var o=(-r*2+i)*.03,s=(-n*2+a)*.03,u=((r-i)*3+1)*.006,l=((n-a)*3+1)*.006,c=o*2+u,f=s*2+l,h=r*.3+o+u*.16666667,d=n*.3+s+l*.16666667,p=e*t.BEZIER_SIZE,v=this.curves;v[p++]=t.BEZIER;for(var g=h,m=d,y=p+t.BEZIER_SIZE-1;p=r){var l=void 0,c=void 0;return i==s?(l=0,c=0):(l=n[i-2],c=n[i-1]),c+(n[i+1]-c)*(r-l)/(o-l)}var f=n[i-1];return f+(1-f)*(r-o)/(1-o)},t.LINEAR=0,t.STEPPED=1,t.BEZIER=2,t.BEZIER_SIZE=10*2-1,t}(),mi=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r<<1),n}return e.prototype.getPropertyId=function(){return(Fr.rotate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i){r<<=1,this.frames[r]=n,this.frames[r+e.ROTATION]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES]){var h=l[l.length+e.PREV_ROTATION];switch(s){case R.setup:c.rotation=c.data.rotation+h*o;break;case R.first:case R.replace:h+=c.data.rotation-c.rotation,h-=(16384-(16384.499999999996-h/360|0))*360;case R.add:c.rotation+=h*o}return}var d=_r.binarySearch(l,i,e.ENTRIES),p=l[d+e.PREV_ROTATION],v=l[d],g=this.getCurvePercent((d>>1)-1,1-(i-v)/(l[d+e.PREV_TIME]-v)),m=l[d+e.ROTATION]-p;switch(m=p+(m-(16384-(16384.499999999996-m/360|0))*360)*g,s){case R.setup:c.rotation=c.data.rotation+(m-(16384-(16384.499999999996-m/360|0))*360)*o;break;case R.first:case R.replace:m+=c.data.rotation-c.rotation;case R.add:c.rotation+=(m-(16384-(16384.499999999996-m/360|0))*360)*o}},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_ROTATION=-1,e.ROTATION=1,e}(da),Tf=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.translate<<24)+this.boneIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.X]=i,this.frames[r+e.Y]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=_r.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.X]-f)*v,h+=(l[d+e.Y]-h)*v}switch(s){case R.setup:c.x=c.data.x+f*o,c.y=c.data.y+h*o;break;case R.first:case R.replace:c.x+=(c.data.x+f-c.x)*o,c.y+=(c.data.y+h-c.y)*o;break;case R.add:c.x+=f*o,c.y+=h*o}},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_X=-2,e.PREV_Y=-1,e.X=1,e.Y=2,e}(da),p3=function(t){tr(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Fr.scale<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X]*c.data.scaleX,h=l[l.length+e.PREV_Y]*c.data.scaleY;else{var d=_r.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=(f+(l[d+e.X]-f)*v)*c.data.scaleX,h=(h+(l[d+e.Y]-h)*v)*c.data.scaleY}if(o==1)s==R.add?(c.scaleX+=f-c.data.scaleX,c.scaleY+=h-c.data.scaleY):(c.scaleX=f,c.scaleY=h);else{var g=0,m=0;if(u==je.mixOut)switch(s){case R.setup:g=c.data.scaleX,m=c.data.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.first:case R.replace:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-g)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-m)*o;break;case R.add:g=c.scaleX,m=c.scaleY,c.scaleX=g+(Math.abs(f)*N.signum(g)-c.data.scaleX)*o,c.scaleY=m+(Math.abs(h)*N.signum(m)-c.data.scaleY)*o}else switch(s){case R.setup:g=Math.abs(c.data.scaleX)*N.signum(f),m=Math.abs(c.data.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.first:case R.replace:g=Math.abs(c.scaleX)*N.signum(f),m=Math.abs(c.scaleY)*N.signum(h),c.scaleX=g+(f-g)*o,c.scaleY=m+(h-m)*o;break;case R.add:g=N.signum(f),m=N.signum(h),c.scaleX=Math.abs(c.scaleX)*g+(f-Math.abs(c.data.scaleX)*g)*o,c.scaleY=Math.abs(c.scaleY)*m+(h-Math.abs(c.data.scaleY)*m)*o}}},e}(Tf),v3=function(t){tr(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Fr.shear<<24)+this.boneIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.bones[this.boneIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_X],h=l[l.length+e.PREV_Y];else{var d=_r.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_X],h=l[d+e.PREV_Y];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f=f+(l[d+e.X]-f)*v,h=h+(l[d+e.Y]-h)*v}switch(s){case R.setup:c.shearX=c.data.shearX+f*o,c.shearY=c.data.shearY+h*o;break;case R.first:case R.replace:c.shearX+=(c.data.shearX+f-c.shearX)*o,c.shearY+=(c.data.shearY+h-c.shearY)*o;break;case R.add:c.shearX+=f*o,c.shearY+=h*o}},e}(Tf),a1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.color<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex],c=this.frames;if(i=c[c.length-e.ENTRIES]){var m=c.length;d=c[m+e.PREV_R],p=c[m+e.PREV_G],v=c[m+e.PREV_B],g=c[m+e.PREV_A]}else{var y=_r.binarySearch(c,i,e.ENTRIES);d=c[y+e.PREV_R],p=c[y+e.PREV_G],v=c[y+e.PREV_B],g=c[y+e.PREV_A];var _=c[y],x=this.getCurvePercent(y/e.ENTRIES-1,1-(i-_)/(c[y+e.PREV_TIME]-_));d+=(c[y+e.R]-d)*x,p+=(c[y+e.G]-p)*x,v+=(c[y+e.B]-v)*x,g+=(c[y+e.A]-g)*x}if(o==1)l.color.set(d,p,v,g);else{var f=l.color;s==R.setup&&f.setFromColor(l.data.color),f.add((d-f.r)*o,(p-f.g)*o,(v-f.b)*o,(g-f.a)*o)}},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_R=-4,e.PREV_G=-3,e.PREV_B=-2,e.PREV_A=-1,e.R=1,e.G=2,e.B=3,e.A=4,e}(da),o1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.twoColor<<24)+this.slotIndex},e.prototype.setFrame=function(r,n,i,a,o,s,u,l,c){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.R]=i,this.frames[r+e.G]=a,this.frames[r+e.B]=o,this.frames[r+e.A]=s,this.frames[r+e.R2]=u,this.frames[r+e.G2]=l,this.frames[r+e.B2]=c},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex],c=this.frames;if(i=c[c.length-e.ENTRIES]){var S=c.length;v=c[S+e.PREV_R],g=c[S+e.PREV_G],m=c[S+e.PREV_B],y=c[S+e.PREV_A],_=c[S+e.PREV_R2],x=c[S+e.PREV_G2],b=c[S+e.PREV_B2]}else{var w=_r.binarySearch(c,i,e.ENTRIES);v=c[w+e.PREV_R],g=c[w+e.PREV_G],m=c[w+e.PREV_B],y=c[w+e.PREV_A],_=c[w+e.PREV_R2],x=c[w+e.PREV_G2],b=c[w+e.PREV_B2];var E=c[w],T=this.getCurvePercent(w/e.ENTRIES-1,1-(i-E)/(c[w+e.PREV_TIME]-E));v+=(c[w+e.R]-v)*T,g+=(c[w+e.G]-g)*T,m+=(c[w+e.B]-m)*T,y+=(c[w+e.A]-y)*T,_+=(c[w+e.R2]-_)*T,x+=(c[w+e.G2]-x)*T,b+=(c[w+e.B2]-b)*T}if(o==1)l.color.set(v,g,m,y),l.darkColor.set(_,x,b,1);else{var f=l.color,h=l.darkColor;s==R.setup&&(f.setFromColor(l.data.color),h.setFromColor(l.data.darkColor)),f.add((v-f.r)*o,(g-f.g)*o,(m-f.b)*o,(y-f.a)*o),h.add((_-h.r)*o,(x-h.g)*o,(b-h.b)*o,0)}},e.ENTRIES=8,e.PREV_TIME=-8,e.PREV_R=-7,e.PREV_G=-6,e.PREV_B=-5,e.PREV_A=-4,e.PREV_R2=-3,e.PREV_G2=-2,e.PREV_B2=-1,e.R=1,e.G=2,e.B=3,e.A=4,e.R2=5,e.G2=6,e.B2=7,e}(da),Rp=function(){function t(e){this.frames=q.newFloatArray(e),this.attachmentNames=new Array(e)}return t.prototype.getPropertyId=function(){return(Fr.attachment<<24)+this.slotIndex},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.attachmentNames[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.slots[this.slotIndex];if(s==je.mixOut&&o==R.setup){var l=u.data.attachmentName;u.setAttachment(l==null?null:e.getAttachment(this.slotIndex,l));return}var c=this.frames;if(n=c[c.length-1]?h=c.length-1:h=_r.binarySearch(c,n,1)-1;var d=this.attachmentNames[h];e.slots[this.slotIndex].setAttachment(d==null?null:e.getAttachment(this.slotIndex,d))},t}(),gO=null,m3=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r),n.frameVertices=new Array(r),gO==null&&(gO=q.newFloatArray(64)),n}return e.prototype.getPropertyId=function(){return(Fr.deform<<27)+ +this.attachment.id+this.slotIndex},e.prototype.setFrame=function(r,n,i){this.frames[r]=n,this.frameVertices[r]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex],c=l.getAttachment();if(!(!(c instanceof Ns)||!c.applyDeform(this.attachment))){var f=l.attachmentVertices;f.length==0&&(s=R.setup);var h=this.frameVertices,d=h[0].length,p=this.frames;if(i=p[p.length-1]){var x=h[p.length-1];if(o==1)if(s==R.add){var v=c;if(v.bones==null)for(var m=v.vertices,y=0;yn)this.apply(e,r,Number.MAX_VALUE,i,a,o,s),r=-1;else if(r>=u[l-1])return;if(!(n0&&u[c-1]==f;)c--}for(;c=u[c];c++)i.push(this.events[c])}}},t}(),Ip=function(){function t(e){this.frames=q.newFloatArray(e),this.drawOrders=new Array(e)}return t.prototype.getPropertyId=function(){return Fr.drawOrder<<24},t.prototype.getFrameCount=function(){return this.frames.length},t.prototype.setFrame=function(e,r,n){this.frames[e]=r,this.drawOrders[e]=n},t.prototype.apply=function(e,r,n,i,a,o,s){var u=e.drawOrder,l=e.slots;if(s==je.mixOut&&o==R.setup){q.arrayCopy(e.slots,0,e.drawOrder,0,e.slots.length);return}var c=this.frames;if(n=c[c.length-1]?f=c.length-1:f=_r.binarySearch(c,n)-1;var h=this.drawOrders[f];if(h==null)q.arrayCopy(l,0,u,0,l.length);else for(var d=0,p=h.length;d=l[l.length-e.ENTRIES]){s==R.setup?(c.mix=c.data.mix+(l[l.length+e.PREV_MIX]-c.data.mix)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0)):(c.mix+=(l[l.length+e.PREV_MIX]-c.mix)*o,u==je.mixIn&&(c.bendDirection=l[l.length+e.PREV_BEND_DIRECTION],c.compress=l[l.length+e.PREV_COMPRESS]!=0,c.stretch=l[l.length+e.PREV_STRETCH]!=0));return}var f=_r.binarySearch(l,i,e.ENTRIES),h=l[f+e.PREV_MIX],d=l[f],p=this.getCurvePercent(f/e.ENTRIES-1,1-(i-d)/(l[f+e.PREV_TIME]-d));s==R.setup?(c.mix=c.data.mix+(h+(l[f+e.MIX]-h)*p-c.data.mix)*o,u==je.mixOut?(c.bendDirection=c.data.bendDirection,c.compress=c.data.compress,c.stretch=c.data.stretch):(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0)):(c.mix+=(h+(l[f+e.MIX]-h)*p-c.mix)*o,u==je.mixIn&&(c.bendDirection=l[f+e.PREV_BEND_DIRECTION],c.compress=l[f+e.PREV_COMPRESS]!=0,c.stretch=l[f+e.PREV_STRETCH]!=0))},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_MIX=-4,e.PREV_BEND_DIRECTION=-3,e.PREV_COMPRESS=-2,e.PREV_STRETCH=-1,e.MIX=1,e.BEND_DIRECTION=2,e.COMPRESS=3,e.STRETCH=4,e}(da),l1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.transformConstraint<<24)+this.transformConstraintIndex},e.prototype.setFrame=function(r,n,i,a,o,s){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a,this.frames[r+e.SCALE]=o,this.frames[r+e.SHEAR]=s},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.transformConstraints[this.transformConstraintIndex];if(i=l[l.length-e.ENTRIES]){var g=l.length;h=l[g+e.PREV_ROTATE],d=l[g+e.PREV_TRANSLATE],p=l[g+e.PREV_SCALE],v=l[g+e.PREV_SHEAR]}else{var m=_r.binarySearch(l,i,e.ENTRIES);h=l[m+e.PREV_ROTATE],d=l[m+e.PREV_TRANSLATE],p=l[m+e.PREV_SCALE],v=l[m+e.PREV_SHEAR];var y=l[m],_=this.getCurvePercent(m/e.ENTRIES-1,1-(i-y)/(l[m+e.PREV_TIME]-y));h+=(l[m+e.ROTATE]-h)*_,d+=(l[m+e.TRANSLATE]-d)*_,p+=(l[m+e.SCALE]-p)*_,v+=(l[m+e.SHEAR]-v)*_}if(s==R.setup){var f=c.data;c.rotateMix=f.rotateMix+(h-f.rotateMix)*o,c.translateMix=f.translateMix+(d-f.translateMix)*o,c.scaleMix=f.scaleMix+(p-f.scaleMix)*o,c.shearMix=f.shearMix+(v-f.shearMix)*o}else c.rotateMix+=(h-c.rotateMix)*o,c.translateMix+=(d-c.translateMix)*o,c.scaleMix+=(p-c.scaleMix)*o,c.shearMix+=(v-c.shearMix)*o},e.ENTRIES=5,e.PREV_TIME=-5,e.PREV_ROTATE=-4,e.PREV_TRANSLATE=-3,e.PREV_SCALE=-2,e.PREV_SHEAR=-1,e.ROTATE=1,e.TRANSLATE=2,e.SCALE=3,e.SHEAR=4,e}(da),kp=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.pathConstraintPosition<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.VALUE]=i},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=_r.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.position=c.data.position+(f-c.data.position)*o:c.position+=(f-c.position)*o},e.ENTRIES=2,e.PREV_TIME=-2,e.PREV_VALUE=-1,e.VALUE=1,e}(da),y3=function(t){tr(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getPropertyId=function(){return(Fr.pathConstraintSpacing<<24)+this.pathConstraintIndex},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_VALUE];else{var h=_r.binarySearch(l,i,e.ENTRIES);f=l[h+e.PREV_VALUE];var d=l[h],p=this.getCurvePercent(h/e.ENTRIES-1,1-(i-d)/(l[h+e.PREV_TIME]-d));f+=(l[h+e.VALUE]-f)*p}s==R.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*o:c.spacing+=(f-c.spacing)*o},e}(kp),u1=function(t){tr(e,t);function e(r){var n=t.call(this,r)||this;return n.frames=q.newFloatArray(r*e.ENTRIES),n}return e.prototype.getPropertyId=function(){return(Fr.pathConstraintMix<<24)+this.pathConstraintIndex},e.prototype.setFrame=function(r,n,i,a){r*=e.ENTRIES,this.frames[r]=n,this.frames[r+e.ROTATE]=i,this.frames[r+e.TRANSLATE]=a},e.prototype.apply=function(r,n,i,a,o,s,u){var l=this.frames,c=r.pathConstraints[this.pathConstraintIndex];if(i=l[l.length-e.ENTRIES])f=l[l.length+e.PREV_ROTATE],h=l[l.length+e.PREV_TRANSLATE];else{var d=_r.binarySearch(l,i,e.ENTRIES);f=l[d+e.PREV_ROTATE],h=l[d+e.PREV_TRANSLATE];var p=l[d],v=this.getCurvePercent(d/e.ENTRIES-1,1-(i-p)/(l[d+e.PREV_TIME]-p));f+=(l[d+e.ROTATE]-f)*v,h+=(l[d+e.TRANSLATE]-h)*v}s==R.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*o,c.translateMix=c.data.translateMix+(h-c.data.translateMix)*o):(c.rotateMix+=(f-c.rotateMix)*o,c.translateMix+=(h-c.translateMix)*o)},e.ENTRIES=3,e.PREV_TIME=-3,e.PREV_ROTATE=-2,e.PREV_TRANSLATE=-1,e.ROTATE=1,e.TRANSLATE=2,e}(da),_3=function(){function t(e){this.tracks=new Array,this.events=new Array,this.listeners=new Array,this.queue=new b3(this),this.propertyIDs=new qD,this.animationsChanged=!1,this.timeScale=1,this.trackEntryPool=new hm(function(){return new x3}),this.data=e}return t.prototype.update=function(e){e*=this.timeScale;for(var r=this.tracks,n=0,i=r.length;n0){if(a.delay-=o,a.delay>0)continue;o=-a.delay,a.delay=0}var s=a.next;if(s!=null){var u=a.trackLast-s.delay;if(u>=0){for(s.delay=0,s.trackTime=a.timeScale==0?0:(u/a.timeScale+e)*s.timeScale,a.trackTime+=o,this.setCurrent(n,s,!0);s.mixingFrom!=null;)s.mixTime+=e,s=s.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&a.mixingFrom==null){r[n]=null,this.queue.end(a),this.disposeNext(a);continue}if(a.mixingFrom!=null&&this.updateMixingFrom(a,e)){var l=a.mixingFrom;for(a.mixingFrom=null,l!=null&&(l.mixingTo=null);l!=null;)this.queue.end(l),l=l.mixingFrom}a.trackTime+=o}}this.queue.drain()},t.prototype.updateMixingFrom=function(e,r){var n=e.mixingFrom;if(n==null)return!0;var i=this.updateMixingFrom(n,r);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.mixTime>0&&e.mixTime>=e.mixDuration?((n.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=n.mixingFrom,n.mixingFrom!=null&&(n.mixingFrom.mixingTo=e),e.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=r*n.timeScale,e.mixTime+=r,!1)},t.prototype.apply=function(e){if(e==null)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,n=this.tracks,i=!1,a=0,o=n.length;a0)){i=!0;var u=a==0?R.first:s.mixBlend,l=s.alpha;s.mixingFrom!=null?l*=this.applyMixingFrom(s,e,u):s.trackTime>=s.trackEnd&&s.next==null&&(l=0);var c=s.animationLast,f=s.getAnimationTime(),h=s.animation.timelines.length,d=s.animation.timelines;if(a==0&&l==1||u==R.add)for(var p=0;p1&&(a=1),n!=R.first&&(n=i.mixBlend));var o=a0&&this.queueEvents(i,c),this.events.length=0,i.nextAnimationLast=c,i.nextTrackLast=i.trackTime,a},t.prototype.applyRotateTimeline=function(e,r,n,i,a,o,s,u){if(u&&(o[s]=0),i==1){e.apply(r,0,n,null,1,a,je.mixIn);return}var l=e,c=l.frames,f=r.bones[l.boneIndex],h=0,d=0;if(n=c[c.length-mi.ENTRIES])d=f.data.rotation+c[c.length+mi.PREV_ROTATION];else{var p=_r.binarySearch(c,n,mi.ENTRIES),v=c[p+mi.PREV_ROTATION],g=c[p],m=l.getCurvePercent((p>>1)-1,1-(n-g)/(c[p+mi.PREV_TIME]-g));d=c[p+mi.ROTATION]-v,d-=(16384-(16384.499999999996-d/360|0))*360,d=v+d*m+f.data.rotation,d-=(16384-(16384.499999999996-d/360|0))*360}var y=0,_=d-h;if(_-=(16384-(16384.499999999996-_/360|0))*360,_==0)y=o[s];else{var x=0,b=0;u?(x=0,b=_):(x=o[s],b=o[s+1]);var S=_>0,w=x>=0;N.signum(b)!=N.signum(_)&&Math.abs(b)<=90&&(Math.abs(x)>180&&(x+=360*N.signum(x)),w=S),y=_+x-x%360,w!=S&&(y+=360*N.signum(x)),o[s]=y}o[s+1]=_,h+=y*i,f.rotation=h-(16384-(16384.499999999996-h/360|0))*360},t.prototype.queueEvents=function(e,r){for(var n=e.animationStart,i=e.animationEnd,a=i-n,o=e.trackLast%a,s=this.events,u=0,l=s.length;ui||this.queue.event(e,c)}var f=!1;for(e.loop?f=a==0||o>e.trackTime%a:f=r>=i&&e.animationLast=this.tracks.length)){var r=this.tracks[e];if(r!=null){this.queue.end(r),this.disposeNext(r);for(var n=r;;){var i=n.mixingFrom;if(i==null)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[r.trackIndex]=null,this.queue.drain()}}},t.prototype.setCurrent=function(e,r,n){var i=this.expandToIndex(e);this.tracks[e]=r,i!=null&&(n&&this.queue.interrupt(i),r.mixingFrom=i,i.mixingTo=r,r.mixTime=0,i.mixingFrom!=null&&i.mixDuration>0&&(r.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(r)},t.prototype.setAnimation=function(e,r,n){var i=this.data.skeletonData.findAnimation(r);if(i==null)throw new Error("Animation not found: "+r);return this.setAnimationWith(e,i,n)},t.prototype.setAnimationWith=function(e,r,n){if(r==null)throw new Error("animation cannot be null.");var i=!0,a=this.expandToIndex(e);a!=null&&(a.nextTrackLast==-1?(this.tracks[e]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.disposeNext(a),a=a.mixingFrom,i=!1):this.disposeNext(a));var o=this.trackEntry(e,r,n,a);return this.setCurrent(e,o,i),this.queue.drain(),o},t.prototype.addAnimation=function(e,r,n,i){var a=this.data.skeletonData.findAnimation(r);if(a==null)throw new Error("Animation not found: "+r);return this.addAnimationWith(e,a,n,i)},t.prototype.addAnimationWith=function(e,r,n,i){if(r==null)throw new Error("animation cannot be null.");var a=this.expandToIndex(e);if(a!=null)for(;a.next!=null;)a=a.next;var o=this.trackEntry(e,r,n,a);if(a==null)this.setCurrent(e,o,!0),this.queue.drain();else if(a.next=o,i<=0){var s=a.animationEnd-a.animationStart;s!=0?(a.loop?i+=s*(1+(a.trackTime/s|0)):i+=Math.max(s,a.trackTime),i-=this.data.getMix(a.animation,r)):i=a.trackTime}return o.delay=i,o},t.prototype.setEmptyAnimation=function(e,r){var n=this.setAnimationWith(e,t.emptyAnimation,!1);return n.mixDuration=r,n.trackEnd=r,n},t.prototype.addEmptyAnimation=function(e,r,n){n<=0&&(n-=r);var i=this.addAnimationWith(e,t.emptyAnimation,!1,n);return i.mixDuration=r,i.trackEnd=r,i},t.prototype.setEmptyAnimations=function(e){var r=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n0){a[u]=t.HOLD_MIX,o[u]=c;continue e}break}a[u]=t.HOLD}}},t.prototype.hasTimeline=function(e,r){for(var n=e.animation.timelines,i=0,a=n.length;i=this.tracks.length?null:this.tracks[e]},t.prototype.addListener=function(e){if(e==null)throw new Error("listener cannot be null.");this.listeners.push(e)},t.prototype.removeListener=function(e){var r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)},t.prototype.clearListeners=function(){this.listeners.length=0},t.prototype.clearListenerNotifications=function(){this.queue.clear()},t.prototype.setAnimationByName=function(e,r,n){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(e,r,n)},t.prototype.addAnimationByName=function(e,r,n,i){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(e,r,n,i)},t.prototype.hasAnimation=function(e){var r=this.data.skeletonData.findAnimation(e);return r!==null},t.prototype.hasAnimationByName=function(e){return t.deprecatedWarning3||(t.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(e)},t.emptyAnimation=new _r("",[],0),t.SUBSEQUENT=0,t.FIRST=1,t.HOLD=2,t.HOLD_MIX=3,t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),x3=function(){function t(){this.mixBlend=R.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return t.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},t.prototype.getAnimationTime=function(){if(this.loop){var e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},t.prototype.setAnimationLast=function(e){this.animationLast=e,this.nextAnimationLast=e},t.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},t.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},Object.defineProperty(t.prototype,"time",{get:function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime},set:function(e){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endTime",{get:function(){return t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime},set:function(e){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime=e},enumerable:!1,configurable:!0}),t.prototype.loopsCount=function(){return Math.floor(this.trackTime/this.trackEnd)},t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t}(),b3=function(){function t(e){this.objects=[],this.drainDisabled=!1,this.animState=e}return t.prototype.start=function(e){this.objects.push(sn.start),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.interrupt=function(e){this.objects.push(sn.interrupt),this.objects.push(e)},t.prototype.end=function(e){this.objects.push(sn.end),this.objects.push(e),this.animState.animationsChanged=!0},t.prototype.dispose=function(e){this.objects.push(sn.dispose),this.objects.push(e)},t.prototype.complete=function(e){this.objects.push(sn.complete),this.objects.push(e)},t.prototype.event=function(e,r){this.objects.push(sn.event),this.objects.push(e),this.objects.push(r)},t.prototype.deprecateStuff=function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'")),!0},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var e=this.objects,r=this.animState.listeners,n=0;n1e-4?(S=Math.abs(p*m-v*g)/S,v=g*S,m=p*S,w=Math.atan2(g,p)*N.radDeg):(p=0,g=0,w=90-Math.atan2(m,v)*N.radDeg);var E=n+o-w,T=n+s-w+90,y=N.cosDeg(E)*i,_=N.cosDeg(T)*a,x=N.sinDeg(E)*i,b=N.sinDeg(T)*a;l.a=p*y-v*x,l.c=p*_-v*b,l.b=g*y+m*x,l.d=g*_+m*b;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,k=(g*A+m*O)/f,S=Math.sqrt(P*P+k*k);S>1e-5&&(S=1/S),P*=S,k*=S,S=Math.sqrt(P*P+k*k),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY>0)&&(S=-S);var M=Math.PI/2+Math.atan2(k,P),B=Math.cos(M)*S,j=Math.sin(M)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,x=N.sinDeg(o)*i,b=N.sinDeg(90+s)*a;l.a=P*y+B*x,l.c=P*_+B*b,l.b=k*y+j*x,l.d=k*_+j*b;break}}l.a*=c,l.c*=c,l.b*=f,l.d*=f},t.prototype.setToSetupPose=function(){var e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY},t.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*N.radDeg},t.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*N.radDeg},t.prototype.getWorldScaleX=function(){var e=this.matrix;return Math.sqrt(e.a*e.a+e.c*e.c)},t.prototype.getWorldScaleY=function(){var e=this.matrix;return Math.sqrt(e.b*e.b+e.d*e.d)},t.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent,r=this.matrix;if(e==null){this.ax=r.tx,this.ay=r.ty,this.arotation=Math.atan2(r.b,r.a)*N.radDeg,this.ascaleX=Math.sqrt(r.a*r.a+r.b*r.b),this.ascaleY=Math.sqrt(r.c*r.c+r.d*r.d),this.ashearX=0,this.ashearY=Math.atan2(r.a*r.c+r.b*r.d,r.a*r.d-r.b*r.c)*N.radDeg;return}var n=e.matrix,i=1/(n.a*n.d-n.b*n.c),a=r.tx-n.tx,o=r.ty-n.ty;this.ax=a*n.d*i-o*n.c*i,this.ay=o*n.a*i-a*n.b*i;var s=i*n.d,u=i*n.a,l=i*n.c,c=i*n.b,f=s*r.a-l*r.b,h=s*r.c-l*r.d,d=u*r.b-c*r.a,p=u*r.d-c*r.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+d*d),this.ascaleX>1e-4){var v=f*p-h*d;this.ascaleY=v/this.ascaleX,this.ashearY=Math.atan2(f*h+d*p,v)*N.radDeg,this.arotation=Math.atan2(d,f)*N.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(h*h+p*p),this.ashearY=0,this.arotation=90-Math.atan2(p,h)*N.radDeg},t.prototype.worldToLocal=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=1/(n*o-i*a),u=e.x-r.tx,l=e.y-r.ty;return e.x=u*o*s-l*i*s,e.y=l*n*s-u*a*s,e},t.prototype.localToWorld=function(e){var r=this.matrix,n=e.x,i=e.y;return e.x=n*r.a+i*r.c+r.tx,e.y=n*r.b+i*r.d+r.ty,e},t.prototype.worldToLocalRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(i.a*r-i.b*n,i.d*n-i.c*r)*N.radDeg},t.prototype.localToWorldRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(n*i.b+r*i.d,n*i.a+r*i.c)*N.radDeg},t.prototype.rotateWorld=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=N.cosDeg(e),u=N.sinDeg(e);r.a=s*n-u*a,r.c=s*i-u*o,r.b=u*n+s*a,r.d=u*i+s*o,this.appliedValid=!1},t}(),E3=function(){function t(e,r,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=Fe.Normal,e<0)throw new Error("index must be >= 0.");if(r==null)throw new Error("name cannot be null.");this.index=e,this.name=r,this.parent=n}return t}(),T3=function(){function t(e,r){if(r==null)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),A3=function(){function t(e){this.name=e}return t}(),C3=function(){function t(e,r){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.mix=e.mix,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch,this.bones=new Array;for(var n=0;n180?p-=360:p<-180&&(p+=360);var v=e.ascaleX,g=e.ascaleY;if(i||a){var m=e.data.length*v,y=Math.sqrt(h*h+d*d);if(i&&ym&&m>1e-4){var _=(y/m-1)*s+1;v*=_,o&&(g*=_)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+p*s,v,g,e.ashearX,e.ashearY)},t.prototype.apply2=function(e,r,n,i,a,o,s){if(s==0){r.updateWorldTransform();return}e.appliedValid||e.updateAppliedTransform(),r.appliedValid||r.updateAppliedTransform();var u=e.ax,l=e.ay,c=e.ascaleX,f=c,h=e.ascaleY,d=r.ascaleX,p=e.matrix,v=0,g=0,m=0;c<0?(c=-c,v=180,m=-1):(v=0,m=1),h<0&&(h=-h,m=-m),d<0?(d=-d,g=180):g=0;var y=r.ax,_=0,x=0,b=0,S=p.a,w=p.c,E=p.b,T=p.d,A=Math.abs(c-h)<=1e-4;A?(_=r.ay,x=S*y+w*_+p.tx,b=E*y+T*_+p.ty):(_=0,x=S*y+p.tx,b=E*y+p.ty);var O=e.parent.matrix;S=O.a,w=O.c,E=O.b,T=O.d;var P=1/(S*T-w*E),k=n-O.tx,M=i-O.ty,B=(k*T-M*w)*P-u,j=(M*S-k*E)*P-l,z=B*B+j*j;k=x-O.tx,M=b-O.ty;var J=(k*T-M*w)*P-u,Z=(M*S-k*E)*P-l,$=Math.sqrt(J*J+Z*Z),F=r.data.length*d,G=0,V=0;e:if(A){F*=c;var U=(z-$*$-F*F)/(2*$*F);U<-1?U=-1:U>1&&(U=1,o&&$+F>1e-4&&(f*=(Math.sqrt(z)/($+F)-1)*s+1)),V=Math.acos(U)*a,S=$+F*U,w=F*Math.sin(V),G=Math.atan2(j*S-B*w,B*S+j*w)}else{S=c*F,w=h*F;var H=S*S,ee=w*w,ie=Math.atan2(j,B);E=ee*$*$+H*z-H*ee;var ae=-2*ee*$,pe=ee-H;if(T=ae*ae-4*pe*E,T>=0){var ye=Math.sqrt(T);ae<0&&(ye=-ye),ye=-(ae+ye)/2;var oe=ye/pe,_e=E/ye,Ce=Math.abs(oe)=-1&&E<=1&&(E=Math.acos(E),k=S*Math.cos(E)+$,M=w*Math.sin(E),T=k*k+M*M,TEt&&(Xe=E,Et=T,tt=k,$t=M)),z<=(ke+Et)/2?(G=ie-Math.atan2(we*a,Oe),V=be*a):(G=ie-Math.atan2($t*a,tt),V=Xe*a)}var qt=Math.atan2(_,y)*m,_t=e.arotation;G=(G-qt)*N.radDeg+v-_t,G>180?G-=360:G<-180&&(G+=360),e.updateWorldTransformWith(u,l,_t+G*s,f,e.ascaleY,0,0),_t=r.arotation,V=((V+qt)*N.radDeg-r.ashearX)*m+g-_t,V>180?V-=360:V<-180&&(V+=360),r.updateWorldTransformWith(y,_,_t+V*s,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),P3=function(){function t(e){this.order=0,this.bones=new Array,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.name=e}return t}(),O3=function(){function t(e){this.order=0,this.bones=new Array,this.name=e}return t}(),Hn;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"})(Hn||(Hn={}));var R3=function(){function t(e,r){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var n=0,i=e.bones.length;n0,a=r>0;if(!(!i&&!a)){var o=this.data,s=o.spacingMode,u=s==Hn.Length,l=o.rotateMode,c=l==Wt.Tangent,f=l==Wt.ChainScale,h=this.bones.length,d=c?h:h+1,p=this.bones,v=q.setArraySize(this.spaces,d),g=null,m=this.spacing;if(f||u){f&&(g=q.setArraySize(this.lengths,h));for(var y=0,_=d-1;y<_;){var x=p[y],b=x.data.length;if(b0?N.degRad:-N.degRad}for(var y=0,M=3;yN.PI?U-=N.PI2:U<-N.PI&&(U+=N.PI2),U*=r,H=Math.cos(U),ee=Math.sin(U),B.a=H*$-ee*G,B.c=H*F-ee*V,B.b=ee*$+H*G,B.d=ee*F+H*V}x.appliedValid=!1}}}},t.prototype.computeWorldPositions=function(e,r,n,i,a){var o=this.target,s=this.position,u=this.spaces,l=q.setArraySize(this.positions,r*3+2),c=null,f=e.closed,h=e.worldVerticesLength,d=h/6,p=t.NONE;if(!e.constantSpeed){var v=e.lengths;d-=f?1:2;var g=v[d];if(i&&(s*=g),a)for(var m=0;mg){p!=t.AFTER&&(p=t.AFTER,e.computeWorldVertices(o,h-6,4,c,0,2)),this.addAfterPosition(b-g,c,0,l,y);continue}for(;;_++){var S=v[_];if(!(b>S)){if(_==0)b/=S;else{var w=v[_-1];b=(b-w)/(S-w)}break}}_!=p&&(p=_,f&&_==d?(e.computeWorldVertices(o,h-4,4,c,0,2),e.computeWorldVertices(o,0,4,c,4,2)):e.computeWorldVertices(o,_*6+2,8,c,0,2)),this.addCurvePosition(b,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],l,y,n||m>0&&x==0)}return l}f?(h+=2,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h-4,c,0,2),e.computeWorldVertices(o,0,2,c,h-4,2),c[h-2]=c[0],c[h-1]=c[1]):(d--,h-=4,c=q.setArraySize(this.world,h),e.computeWorldVertices(o,2,h,c,0,2));for(var E=q.setArraySize(this.curves,d),T=0,A=c[0],O=c[1],P=0,k=0,M=0,B=0,j=0,z=0,J=0,Z=0,$=0,F=0,G=0,V=0,U=0,H=0,m=0,ee=2;mT){this.addAfterPosition(b-T,c,h-4,l,y);continue}for(;;_++){var ye=E[_];if(!(b>ye)){if(_==0)b/=ye;else{var w=E[_-1];b=(b-w)/(ye-w)}break}}if(_!=p){p=_;var oe=_*6;for(A=c[oe],O=c[oe+1],P=c[oe+2],k=c[oe+3],M=c[oe+4],B=c[oe+5],j=c[oe+6],z=c[oe+7],J=(A-P*2+M)*.03,Z=(O-k*2+B)*.03,$=((P-M)*3-A+j)*.006,F=((k-B)*3-O+z)*.006,G=J*2+$,V=Z*2+F,U=(P-A)*.3+J+$*.16666667,H=(k-O)*.3+Z+F*.16666667,ae=Math.sqrt(U*U+H*H),ie[0]=ae,oe=1;oe<8;oe++)U+=G,H+=V,G+=$,V+=F,ae+=Math.sqrt(U*U+H*H),ie[oe]=ae;U+=G,H+=V,ae+=Math.sqrt(U*U+H*H),ie[8]=ae,U+=G+$,H+=V+F,ae+=Math.sqrt(U*U+H*H),ie[9]=ae,pe=0}for(b*=ae;;pe++){var _e=ie[pe];if(!(b>_e)){if(pe==0)b/=_e;else{var w=ie[pe-1];b=pe+(b-w)/(_e-w)}break}}this.addCurvePosition(b*.1,A,O,P,k,M,B,j,z,l,y,n||m>0&&x==0)}return l},t.prototype.addBeforePosition=function(e,r,n,i,a){var o=r[n],s=r[n+1],u=r[n+2]-o,l=r[n+3]-s,c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addAfterPosition=function(e,r,n,i,a){var o=r[n+2],s=r[n+3],u=o-r[n],l=s-r[n+1],c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addCurvePosition=function(e,r,n,i,a,o,s,u,l,c,f,h){(e==0||isNaN(e))&&(e=1e-4);var d=e*e,p=d*e,v=1-e,g=v*v,m=g*v,y=v*e,_=y*3,x=v*_,b=_*e,S=r*m+i*x+o*b+u*p,w=n*m+a*x+s*b+l*p;c[f]=S,c[f+1]=w,h&&(c[f+2]=Math.atan2(w-(n*g+a*y*2+s*d),S-(r*g+i*y*2+o*d)))},t.prototype.getOrder=function(){return this.data.order},t.NONE=-1,t.BEFORE=-2,t.AFTER=-3,t.epsilon=1e-5,t}(),I3=function(){function t(e,r){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new gf,e==null)throw new Error("data cannot be null.");if(r==null)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var n=0;n0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=(O.x-_.tx)*r,_.ty+=(O.y-_.ty)*r,y=!0}if(n>0){var P=Math.sqrt(_.a*_.a+_.b*_.b),k=Math.sqrt(s*s+l*l);P>1e-5&&(P=(P+(k-P+this.data.offsetScaleX)*n)/P),_.a*=P,_.b*=P,P=Math.sqrt(_.c*_.c+_.d*_.d),k=Math.sqrt(u*u+c*c),P>1e-5&&(P=(P+(k-P+this.data.offsetScaleY)*n)/P),_.c*=P,_.d*=P,y=!0}if(i>0){var b=_.c,w=_.d,M=Math.atan2(w,b),E=Math.atan2(c,u)-Math.atan2(l,s)-(M-Math.atan2(_.b,_.a));E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E=M+(E+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target,o=a.matrix,s=o.a,u=o.c,l=o.b,c=o.d,f=s*c-u*l>0?N.degRad:-N.degRad,h=this.data.offsetRotation*f,d=this.data.offsetShearY*f,p=this.bones,v=0,g=p.length;vN.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2),E*=e;var T=Math.cos(E),A=Math.sin(E);_.a=T*x-A*S,_.c=T*b-A*w,_.b=A*x+T*S,_.d=A*b+T*w,y=!0}if(r!=0){var O=this.temp;a.localToWorld(O.set(this.data.offsetX,this.data.offsetY)),_.tx+=O.x*r,_.ty+=O.y*r,y=!0}if(n>0){var P=(Math.sqrt(s*s+l*l)-1+this.data.offsetScaleX)*n+1;_.a*=P,_.b*=P,P=(Math.sqrt(u*u+c*c)-1+this.data.offsetScaleY)*n+1,_.c*=P,_.d*=P,y=!0}if(i>0){var E=Math.atan2(c,u)-Math.atan2(l,s);E>N.PI?E-=N.PI2:E<-N.PI&&(E+=N.PI2);var b=_.c,w=_.d;E=Math.atan2(w,b)+(E-N.PI/2+d)*i;var P=Math.sqrt(b*b+w*w);_.c=Math.cos(E)*P,_.d=Math.sin(E)*P,y=!0}y&&(m.appliedValid=!1)}},t.prototype.applyAbsoluteLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(p>1e-5&&(p=(p+(a.ascaleX-p+this.data.offsetScaleX)*n)/p),v>1e-5&&(v=(v+(a.ascaleY-v+this.data.offsetScaleY)*n)/v));var g=l.ashearY;if(i>0){var f=a.ashearY-g+this.data.offsetShearY;f-=(16384-(16384.499999999996-f/360|0))*360,l.shearY+=f*i}l.updateWorldTransformWith(h,d,c,p,v,l.ashearX,g)}},t.prototype.applyRelativeLocal=function(){var e=this.rotateMix,r=this.translateMix,n=this.scaleMix,i=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var o=this.bones,s=0,u=o.length;s0&&(d>1e-5&&(d*=(a.ascaleX-1+this.data.offsetScaleX)*n+1),p>1e-5&&(p*=(a.ascaleY-1+this.data.offsetScaleY)*n+1));var v=l.ashearY;i>0&&(v+=(a.ashearY+this.data.offsetShearY)*i),l.updateWorldTransformWith(f,h,c,d,p,l.ashearX,v)}},t.prototype.getOrder=function(){return this.data.order},t}(),k3=function(){function t(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,e==null)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var r=0;r1){var a=n[n.length-1];this._updateCache.indexOf(a)>-1||this.updateCacheReset.push(a)}this._updateCache.push(e),this.sortReset(i.children),n[n.length-1].sorted=!0},t.prototype.sortPathConstraint=function(e){var r=e.target,n=r.data.index,i=r.bone;this.skin!=null&&this.sortPathConstraintAttachment(this.skin,n,i),this.data.defaultSkin!=null&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,i);for(var a=0,o=this.data.skins.length;a-1||this.updateCacheReset.push(a)}else for(var i=0;i= 0.");if(r==null)throw new Error("name cannot be null.");if(n==null)throw new Error("boneData cannot be null.");this.index=e,this.name=r,this.boneData=n}return t}(),N3=function(){function t(e){if(this.order=0,this.bones=new Array,this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1,e==null)throw new Error("name cannot be null.");this.name=e}return t}(),L3=function(){function t(e){if(this.attachments=new Array,e==null)throw new Error("name cannot be null.");this.name=e}return t.prototype.addAttachment=function(e,r,n){if(n==null)throw new Error("attachment cannot be null.");var i=this.attachments;e>=i.length&&(i.length=e+1),i[e]||(i[e]={}),i[e][r]=n},t.prototype.getAttachment=function(e,r){var n=this.attachments[e];return n?n[r]:null},t.prototype.attachAll=function(e,r){for(var n=0,i=0;i=0;p--)pe[p]==-1&&(pe[p]=oe[--Ce])}h.setFrame(d++,ae.time,pe)}a.push(h),o=Math.max(o,h.frames[h.getFrameCount()-1])}if(e.events){for(var h=new g3(e.events.length),d=0,p=0;p>1)*s;var u=r.bone.skeleton,l=r.deform,c=this.vertices,f=this.bones;if(!f){l.length>0&&(c=l);for(var h=r.bone.matrix,d=h.tx,p=h.ty,v=h.a,g=h.c,m=h.b,y=h.d,_=n,x=o;x=this.regions.length&&(n=this.regions.length-1);var i=this.regions[n];r.region!=i&&(r.region=i)},t.prototype.getPath=function(e,r){for(var n=e,i=(this.start+r).toString(),a=this.digits-i.length;a>0;a--)n+="0";return n+=i,n},t.nextID=function(){return t._nextID++},t._nextID=0,t}(),Pr;(function(t){t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse"})(Pr||(Pr={}));var rE=[Pr.hold,Pr.once,Pr.loop,Pr.pingpong,Pr.onceReverse,Pr.loopReverse,Pr.pingpongReverse],gm=function(){function t(e,r,n){if(this.timelines=[],this.timelineIds=new qD,!e)throw new Error("name cannot be null.");this.name=e,this.setTimelines(r),this.duration=n}return t.prototype.setTimelines=function(e){if(!e)throw new Error("timelines cannot be null.");this.timelines=e,this.timelineIds.clear();for(var r=0;r0&&(r%=this.duration));for(var l=this.timelines,c=0,f=l.length;cr)return i-1;return n-1},t.search=function(e,r,n){for(var i=e.length,a=n;ar)return a-n;return i-n},t}(),Pi=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,i)||this;return a.curves=q.newFloatArray(r+n*18),a.curves[r-1]=1,a}return e.prototype.setLinear=function(r){this.curves[r]=0},e.prototype.setStepped=function(r){this.curves[r]=1},e.prototype.shrink=function(r){var n=this.getFrameCount()+r*18;if(this.curves.length>n){var i=q.newFloatArray(n);q.arrayCopy(this.curves,0,i,0,n),this.curves=i}},e.prototype.setBezier=function(r,n,i,a,o,s,u,l,c,f,h){var d=this.curves,p=this.getFrameCount()+r*18;i==0&&(d[n]=2+p);for(var v=(a-s*2+l)*.03,g=(o-u*2+c)*.03,m=((s-l)*3-a+f)*.006,y=((u-c)*3-o+h)*.006,_=v*2+m,x=g*2+y,b=(s-a)*.3+v+m*.16666667,S=(u-o)*.3+g+y*.16666667,w=a+b,E=o+S,T=p+18;pr){var s=this.frames[n],u=this.frames[n+i];return u+(r-s)/(o[a]-s)*(o[a+1]-u)}var l=a+18;for(a+=2;a=r){var c=o[a-2],f=o[a-1];return f+(r-c)/(o[a]-c)*(o[a+1]-f)}n+=this.getFrameEntries();var h=o[l-2],d=o[l-1];return d+(r-h)/(this.frames[n]-h)*(this.frames[n+i]-d)},e}(Yt),Oi=function(t){Ve(e,t);function e(r,n,i){return t.call(this,r,n,[i])||this}return e.prototype.getFrameEntries=function(){return 2},e.prototype.setFrame=function(r,n,i){r<<=1,this.frames[r]=n,this.frames[r+1]=i},e.prototype.getCurveValue=function(r){for(var n=this.frames,i=n.length-2,a=2;a<=i;a+=2)if(n[a]>r){i=a-2;break}var o=this.curves[i>>1];switch(o){case 0:var s=n[i],u=n[i+1];return u+(r-s)/(n[i+2]-s)*(n[i+2+1]-u);case 1:return n[i+1]}return this.getBezierValue(r,i,1,o-2)},e}(Pi),ym=function(t){Ve(e,t);function e(r,n,i,a){return t.call(this,r,n,[i,a])||this}return e.prototype.getFrameEntries=function(){return 3},e.prototype.setFrame=function(r,n,i,a){r*=3,this.frames[r]=n,this.frames[r+1]=i,this.frames[r+2]=a},e}(Pi),Cf=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,n,nt.rotate+"|"+i)||this;return a.boneIndex=0,a.boneIndex=i,a}return e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.bones[this.boneIndex];if(l.active){var c=this.frames;if(i>2];switch(m){case 0:var y=c[g];d=c[g+1],p=c[g+2],v=c[g+3];var _=(i-y)/(c[g+4]-y);d+=(c[g+4+1]-d)*_,p+=(c[g+4+2]-p)*_,v+=(c[g+4+3]-v)*_;break;case 1:d=c[g+1],p=c[g+2],v=c[g+3];break;default:d=this.getBezierValue(i,g,1,m-2),p=this.getBezierValue(i,g,2,m+18-2),v=this.getBezierValue(i,g,3,m+18*2-2)}if(o==1)f.r=d,f.g=p,f.b=v;else{if(s==R.setup){var h=l.data.color;f.r=h.r,f.g=h.g,f.b=h.b}f.r+=(d-f.r)*o,f.g+=(p-f.g)*o,f.b+=(v-f.b)*o}}},e}(Pi),pE=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,n,nt.alpha+"|"+i)||this;return a.slotIndex=0,a.slotIndex=i,a}return e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.color;if(i>3];switch(w){case 0:var E=c[S];v=c[S+1],g=c[S+2],m=c[S+3],y=c[S+4],_=c[S+5],x=c[S+6],b=c[S+7];var T=(i-E)/(c[S+8]-E);v+=(c[S+8+1]-v)*T,g+=(c[S+8+2]-g)*T,m+=(c[S+8+3]-m)*T,y+=(c[S+8+4]-y)*T,_+=(c[S+8+5]-_)*T,x+=(c[S+8+6]-x)*T,b+=(c[S+8+7]-b)*T;break;case 1:v=c[S+1],g=c[S+2],m=c[S+3],y=c[S+4],_=c[S+5],x=c[S+6],b=c[S+7];break;default:v=this.getBezierValue(i,S,1,w-2),g=this.getBezierValue(i,S,2,w+18-2),m=this.getBezierValue(i,S,3,w+18*2-2),y=this.getBezierValue(i,S,4,w+18*3-2),_=this.getBezierValue(i,S,5,w+18*4-2),x=this.getBezierValue(i,S,6,w+18*5-2),b=this.getBezierValue(i,S,7,w+18*6-2)}if(o==1)f.set(v,g,m,y),h.r=_,h.g=x,h.b=b;else{if(s==R.setup){f.setFromColor(l.data.color);var p=l.data.darkColor;h.r=p.r,h.g=p.g,h.b=p.b}f.add((v-f.r)*o,(g-f.g)*o,(m-f.b)*o,(y-f.a)*o),h.r+=(_-h.r)*o,h.g+=(x-h.g)*o,h.b+=(b-h.b)*o}}},e}(Pi),mE=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,n,[nt.rgb+"|"+i,nt.rgb2+"|"+i])||this;return a.slotIndex=0,a.slotIndex=i,a}return e.prototype.getFrameEntries=function(){return 7},e.prototype.setFrame=function(r,n,i,a,o,s,u,l){r*=7,this.frames[r]=n,this.frames[r+1]=i,this.frames[r+2]=a,this.frames[r+3]=o,this.frames[r+4]=s,this.frames[r+5]=u,this.frames[r+6]=l},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=this.frames,f=l.color,h=l.darkColor;if(ir){var s=this.frames[n];return i[a+1]*(r-s)/(i[a]-s)}var u=a+18;for(a+=2;a=r){var l=i[a-2],c=i[a-1];return c+(r-l)/(i[a]-l)*(i[a+1]-c)}var f=i[u-2],h=i[u-1];return h+(1-h)*(r-f)/(this.frames[n+this.getFrameEntries()]-f)},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.getAttachment();if(c&&!(!(c instanceof ia)||c.timelineAttachment!=this.attachment)){var f=l.deform;f.length==0&&(s=R.setup);var h=this.vertices,d=h[0].length,p=this.frames;if(i=p[p.length-1]){var y=h[p.length-1];if(o==1)if(s==R.add){var v=c;if(v.bones)for(var x=0;xi)this.apply(r,n,Number.MAX_VALUE,a,o,s,u),n=-1;else if(n>=l[c-1])return;if(!(i0&&l[f-1]==h;)f--}for(;f=l[f];f++)a.push(this.events[f])}}},e.propertyIds=[""+nt.event],e}(Yt),Rl=function(t){Ve(e,t);function e(r){var n=t.call(this,r,e.propertyIds)||this;return n.drawOrders=new Array(r),n}return e.prototype.getFrameCount=function(){return this.frames.length},e.prototype.setFrame=function(r,n,i){this.frames[r]=n,this.drawOrders[r]=i},e.prototype.apply=function(r,n,i,a,o,s,u){if(u==je.mixOut){s==R.setup&&q.arrayCopy(r.slots,0,r.drawOrder,0,r.slots.length);return}if(i>2];switch(v){case 0:var g=c[p];f=c[p+1],h=c[p+2],d=c[p+3];var m=(i-g)/(c[p+4]-g);f+=(c[p+4+1]-f)*m,h+=(c[p+4+2]-h)*m,d+=(c[p+4+3]-d)*m;break;case 1:f=c[p+1],h=c[p+2],d=c[p+3];break;default:f=this.getBezierValue(i,p,1,v-2),h=this.getBezierValue(i,p,2,v+18-2),d=this.getBezierValue(i,p,3,v+18*2-2)}if(s==R.setup){var y=l.data;l.mixRotate=y.mixRotate+(f-y.mixRotate)*o,l.mixX=y.mixX+(h-y.mixX)*o,l.mixY=y.mixY+(d-y.mixY)*o}else l.mixRotate+=(f-l.mixRotate)*o,l.mixX+=(h-l.mixX)*o,l.mixY+=(d-l.mixY)*o}},e}(Pi),wE=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,[nt.sequence+"|"+n+"|"+i.sequence.id])||this;return a.slotIndex=n,a.attachment=i,a}return e.prototype.getFrameEntries=function(){return e.ENTRIES},e.prototype.getSlotIndex=function(){return this.slotIndex},e.prototype.getAttachment=function(){return this.attachment},e.prototype.setFrame=function(r,n,i,a,o){var s=this.frames;r*=e.ENTRIES,s[r]=n,s[r+e.MODE]=i|a<<4,s[r+e.DELAY]=o},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.attachment,f=this.attachment;if(!(c!=f&&(!(c instanceof ia)||c.timelineAttachment!=f))){var h=this.frames;if(i>4,y=this.attachment.sequence.regions.length,_=rE[v&15];if(_!=Pr.hold)switch(m+=(i-p)/g+1e-5|0,_){case Pr.once:m=Math.min(y-1,m);break;case Pr.loop:m%=y;break;case Pr.pingpong:{var x=(y<<1)-2;m=x==0?0:m%x,m>=y&&(m=x-m);break}case Pr.onceReverse:m=Math.max(y-1-m,0);break;case Pr.loopReverse:m=y-1-m%y;break;case Pr.pingpongReverse:{var x=(y<<1)-2;m=x==0?0:(m+y-1)%x,m>=y&&(m=x-m)}}l.sequenceIndex=m}}}},e.ENTRIES=3,e.MODE=1,e.DELAY=2,e}(Yt),U3=function(){function t(e){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new V3(this),this.propertyIDs=new qD,this.animationsChanged=!1,this.trackEntryPool=new hm(function(){return new $3}),this.data=e}return t.emptyAnimation=function(){return t._emptyAnimation},t.prototype.update=function(e){e*=this.timeScale;for(var r=this.tracks,n=0,i=r.length;n0){if(a.delay-=o,a.delay>0)continue;o=-a.delay,a.delay=0}var s=a.next;if(s){var u=a.trackLast-s.delay;if(u>=0){for(s.delay=0,s.trackTime+=a.timeScale==0?0:(u/a.timeScale+e)*s.timeScale,a.trackTime+=o,this.setCurrent(n,s,!0);s.mixingFrom;)s.mixTime+=e,s=s.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&!a.mixingFrom){r[n]=null,this.queue.end(a),this.clearNext(a);continue}if(a.mixingFrom&&this.updateMixingFrom(a,e)){var l=a.mixingFrom;for(a.mixingFrom=null,l&&(l.mixingTo=null);l;)this.queue.end(l),l=l.mixingFrom}a.trackTime+=o}}this.queue.drain()},t.prototype.updateMixingFrom=function(e,r){var n=e.mixingFrom;if(!n)return!0;var i=this.updateMixingFrom(n,r);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.mixTime>0&&e.mixTime>=e.mixDuration?((n.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=n.mixingFrom,n.mixingFrom&&(n.mixingFrom.mixingTo=e),e.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=r*n.timeScale,e.mixTime+=r,!1)},t.prototype.apply=function(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,n=this.tracks,i=!1,a=0,o=n.length;a0)){i=!0;var u=a==0?R.first:s.mixBlend,l=s.alpha;s.mixingFrom?l*=this.applyMixingFrom(s,e,u):s.trackTime>=s.trackEnd&&!s.next&&(l=0);var c=s.animationLast,f=s.getAnimationTime(),h=f,d=r;s.reverse&&(h=s.animation.duration-h,d=null);var p=s.animation.timelines,v=p.length;if(a==0&&l==1||u==R.add)for(var g=0;g1&&(a=1),n!=R.first&&(n=i.mixBlend));var o=a0&&this.queueEvents(i,d),this.events.length=0,i.nextAnimationLast=d,i.nextTrackLast=i.trackTime,a},t.prototype.applyAttachmentTimeline=function(e,r,n,i,a){var o=r.slots[e.slotIndex];o.bone.active&&(n0,y=v>=0;N.signum(g)!=N.signum(p)&&Math.abs(g)<=90&&(Math.abs(v)>180&&(v+=360*N.signum(v)),y=m),d=p+v-v%360,y!=m&&(d+=360*N.signum(v)),o[s]=d}o[s+1]=p,l.rotation=f+d*i}},t.prototype.queueEvents=function(e,r){for(var n=e.animationStart,i=e.animationEnd,a=i-n,o=e.trackLast%a,s=this.events,u=0,l=s.length;ui||this.queue.event(e,c)}var f=!1;for(e.loop?f=a==0||o>e.trackTime%a:f=r>=i&&e.animationLast=this.tracks.length)){var r=this.tracks[e];if(r){this.queue.end(r),this.clearNext(r);for(var n=r;;){var i=n.mixingFrom;if(!i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[r.trackIndex]=null,this.queue.drain()}}},t.prototype.setCurrent=function(e,r,n){var i=this.expandToIndex(e);this.tracks[e]=r,r.previous=null,i&&(n&&this.queue.interrupt(i),r.mixingFrom=i,i.mixingTo=r,r.mixTime=0,i.mixingFrom&&i.mixDuration>0&&(r.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(r)},t.prototype.setAnimation=function(e,r,n){n===void 0&&(n=!1);var i=this.data.skeletonData.findAnimation(r);if(!i)throw new Error("Animation not found: "+r);return this.setAnimationWith(e,i,n)},t.prototype.setAnimationWith=function(e,r,n){if(n===void 0&&(n=!1),!r)throw new Error("animation cannot be null.");var i=!0,a=this.expandToIndex(e);a&&(a.nextTrackLast==-1?(this.tracks[e]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.clearNext(a),a=a.mixingFrom,i=!1):this.clearNext(a));var o=this.trackEntry(e,r,n,a);return this.setCurrent(e,o,i),this.queue.drain(),o},t.prototype.addAnimation=function(e,r,n,i){n===void 0&&(n=!1),i===void 0&&(i=0);var a=this.data.skeletonData.findAnimation(r);if(!a)throw new Error("Animation not found: "+r);return this.addAnimationWith(e,a,n,i)},t.prototype.addAnimationWith=function(e,r,n,i){if(n===void 0&&(n=!1),i===void 0&&(i=0),!r)throw new Error("animation cannot be null.");var a=this.expandToIndex(e);if(a)for(;a.next;)a=a.next;var o=this.trackEntry(e,r,n,a);return a?(a.next=o,o.previous=a,i<=0&&(i+=a.getTrackComplete()-o.mixDuration)):(this.setCurrent(e,o,!0),this.queue.drain()),o.delay=i,o},t.prototype.setEmptyAnimation=function(e,r){r===void 0&&(r=0);var n=this.setAnimationWith(e,t.emptyAnimation(),!1);return n.mixDuration=r,n.trackEnd=r,n},t.prototype.addEmptyAnimation=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=0);var i=this.addAnimationWith(e,t.emptyAnimation(),!1,n);return n<=0&&(i.delay+=i.mixDuration-r),i.mixDuration=r,i.trackEnd=r,i},t.prototype.setEmptyAnimations=function(e){e===void 0&&(e=0);var r=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n0){a[u]=r_e,o[u]=f;continue e}break}a[u]=Vy}}},t.prototype.getCurrent=function(e){return e>=this.tracks.length?null:this.tracks[e]},t.prototype.addListener=function(e){if(!e)throw new Error("listener cannot be null.");this.listeners.push(e)},t.prototype.removeListener=function(e){var r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)},t.prototype.clearListeners=function(){this.listeners.length=0},t.prototype.clearListenerNotifications=function(){this.queue.clear()},t.prototype.setAnimationByName=function(e,r,n){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(e,r,n)},t.prototype.addAnimationByName=function(e,r,n,i){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(e,r,n,i)},t.prototype.hasAnimation=function(e){var r=this.data.skeletonData.findAnimation(e);return r!==null},t.prototype.hasAnimationByName=function(e){return t.deprecatedWarning3||(t.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(e)},t._emptyAnimation=new gm("",[],0),t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),$3=function(){function t(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=R.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return t.prototype.reset=function(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},t.prototype.getAnimationTime=function(){if(this.loop){var e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},t.prototype.setAnimationLast=function(e){this.animationLast=e,this.nextAnimationLast=e},t.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},t.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},t.prototype.getTrackComplete=function(){var e=this.animationEnd-this.animationStart;if(e!=0){if(this.loop)return e*(1+(this.trackTime/e|0));if(this.trackTime1e-4?(S=Math.abs(p*m-v*g)/S,p/=c,g/=f,v=g*S,m=p*S,w=Math.atan2(g,p)*N.radDeg):(p=0,g=0,w=90-Math.atan2(m,v)*N.radDeg);var E=n+o-w,T=n+s-w+90,y=N.cosDeg(E)*i,_=N.cosDeg(T)*a,x=N.sinDeg(E)*i,b=N.sinDeg(T)*a;l.a=p*y-v*x,l.c=p*_-v*b,l.b=g*y+m*x,l.d=g*_+m*b;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,k=(g*A+m*O)/f,S=Math.sqrt(P*P+k*k);S>1e-5&&(S=1/S),P*=S,k*=S,S=Math.sqrt(P*P+k*k),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(c<0!=f<0)&&(S=-S);var M=Math.PI/2+Math.atan2(k,P),B=Math.cos(M)*S,j=Math.sin(M)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,x=N.sinDeg(o)*i,b=N.sinDeg(90+s)*a;l.a=P*y+B*x,l.c=P*_+B*b,l.b=k*y+j*x,l.d=k*_+j*b;break}}l.a*=c,l.c*=c,l.b*=f,l.d*=f},t.prototype.setToSetupPose=function(){var e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY},t.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*N.radDeg},t.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*N.radDeg},t.prototype.getWorldScaleX=function(){var e=this.matrix;return Math.sqrt(e.a*e.a+e.b*e.b)},t.prototype.getWorldScaleY=function(){var e=this.matrix;return Math.sqrt(e.c*e.c+e.d*e.d)},t.prototype.updateAppliedTransform=function(){var e=this.parent,r=this.matrix;if(!e){this.ax=r.tx-this.skeleton.x,this.ay=r.ty-this.skeleton.y,this.arotation=Math.atan2(r.b,r.a)*N.radDeg,this.ascaleX=Math.sqrt(r.a*r.a+r.b*r.b),this.ascaleY=Math.sqrt(r.c*r.c+r.d*r.d),this.ashearX=0,this.ashearY=Math.atan2(r.a*r.c+r.b*r.d,r.a*r.d-r.b*r.c)*N.radDeg;return}var n=e.matrix,i=1/(n.a*n.d-n.b*n.c),a=r.tx-n.tx,o=r.ty-n.ty;this.ax=a*n.d*i-o*n.c*i,this.ay=o*n.a*i-a*n.b*i;var s=i*n.d,u=i*n.a,l=i*n.c,c=i*n.b,f=s*r.a-l*r.b,h=s*r.c-l*r.d,d=u*r.b-c*r.a,p=u*r.d-c*r.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+d*d),this.ascaleX>1e-4){var v=f*p-h*d;this.ascaleY=v/this.ascaleX,this.ashearY=Math.atan2(f*h+d*p,v)*N.radDeg,this.arotation=Math.atan2(d,f)*N.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(h*h+p*p),this.ashearY=0,this.arotation=90-Math.atan2(p,h)*N.radDeg},t.prototype.worldToLocal=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=1/(n*o-i*a),u=e.x-r.tx,l=e.y-r.ty;return e.x=u*o*s-l*i*s,e.y=l*n*s-u*a*s,e},t.prototype.localToWorld=function(e){var r=this.matrix,n=e.x,i=e.y;return e.x=n*r.a+i*r.c+r.tx,e.y=n*r.b+i*r.d+r.ty,e},t.prototype.worldToLocalRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(i.a*r-i.b*n,i.d*n-i.c*r)*N.radDeg},t.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(n*i.b+r*i.d,n*i.a+r*i.c)*N.radDeg},t.prototype.rotateWorld=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=N.cosDeg(e),u=N.sinDeg(e);r.a=s*n-u*a,r.c=s*i-u*o,r.b=u*n+s*a,r.d=u*i+s*o},t}(),TE=function(){function t(e,r,n){if(this.index=0,this.parent=null,this.length=0,this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=Fe.Normal,this.skinRequired=!1,this.color=new de,e<0)throw new Error("index must be >= 0.");if(!r)throw new Error("name cannot be null.");this.index=e,this.name=r,this.parent=n}return t}(),xm=function(){function t(e,r,n){this.name=e,this.order=r,this.skinRequired=n}return t}(),AE=function(){function t(e,r){if(this.intValue=0,this.floatValue=0,this.stringValue=null,this.time=0,this.volume=0,this.balance=0,!r)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),CE=function(){function t(e){this.intValue=0,this.floatValue=0,this.stringValue=null,this.audioPath=null,this.volume=0,this.balance=0,this.name=e}return t}(),X3=function(){function t(e,r){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,!e)throw new Error("data cannot be null.");if(!r)throw new Error("skeleton cannot be null.");this.data=e,this.mix=e.mix,this.softness=e.softness,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch,this.bones=new Array;for(var n=0;n180?d-=360:d<-180&&(d+=360);var E=e.ascaleX,T=e.ascaleY;if(i||a){switch(e.data.transformMode){case Fe.NoScale:case Fe.NoScaleOrReflection:p=r-e.worldX,v=n-e.worldY}var A=e.data.length*E,O=Math.sqrt(p*p+v*v);if(i&&OA&&A>1e-4){var y=(O/A-1)*s+1;E*=y,o&&(T*=y)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*s,E,T,e.ashearX,e.ashearY)},t.prototype.apply2=function(e,r,n,i,a,o,s,u,l){var c=e.ax,f=e.ay,h=e.ascaleX,d=e.ascaleY,p=h,v=d,g=r.ascaleX,m=e.matrix,y=0,_=0,x=0;h<0?(h=-h,y=180,x=-1):(y=0,x=1),d<0&&(d=-d,x=-x),g<0?(g=-g,_=180):_=0;var b=r.ax,S=0,w=0,E=0,T=m.a,A=m.c,O=m.b,P=m.d,k=Math.abs(h-d)<=1e-4;!k||o?(S=0,w=T*b+m.tx,E=O*b+m.ty):(S=r.ay,w=T*b+A*S+m.tx,E=O*b+P*S+m.ty);var M=e.parent.matrix;if(!M)throw new Error("IK parent must itself have a parent.");T=M.a,A=M.c,O=M.b,P=M.d;var B=1/(T*P-A*O),j=w-M.tx,z=E-M.ty,J=(j*P-z*A)*B-c,Z=(z*T-j*O)*B-f,$=Math.sqrt(J*J+Z*Z),F=r.data.length*g,G,V;if($<1e-4){this.apply1(e,n,i,!1,o,!1,l),r.updateWorldTransformWith(b,S,0,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY);return}j=n-M.tx,z=i-M.ty;var U=(j*P-z*A)*B-c,H=(z*T-j*O)*B-f,ee=U*U+H*H;if(u!=0){u*=h*(g+1)*.5;var ie=Math.sqrt(ee),ae=ie-$-F*h+u;if(ae>0){var pe=Math.min(1,ae/(u*2))-1;pe=(ae-u*(1-pe*pe))/ie,U-=pe*U,H-=pe*H,ee=U*U+H*H}}e:if(k){F*=h;var ye=(ee-$*$-F*F)/(2*$*F);ye<-1?(ye=-1,V=Math.PI*a):ye>1?(ye=1,V=0,o&&(T=(Math.sqrt(ee)/($+F)-1)*l+1,p*=T,s&&(v*=T))):V=Math.acos(ye)*a,T=$+F*ye,A=F*Math.sin(V),G=Math.atan2(H*T-U*A,U*T+H*A)}else{T=h*F,A=d*F;var oe=T*T,_e=A*A,Ce=Math.atan2(H,U);O=_e*$*$+oe*ee-oe*_e;var be=-2*_e*$,Oe=_e-oe;if(P=be*be-4*Oe*O,P>=0){var ke=Math.sqrt(P);be<0&&(ke=-ke),ke=-(be+ke)*.5;var we=ke/Oe,Xe=O/ke,tt=Math.abs(we)=-1&&O<=1&&(O=Math.acos(O),j=T*Math.cos(O)+$,z=A*Math.sin(O),P=j*j+z*z,Pur&&(lr=O,ur=P,Dr=j,xr=z)),ee<=(Ht+ur)*.5?(G=Ce-Math.atan2(_t*a,$t),V=Et*a):(G=Ce-Math.atan2(xr*a,Dr),V=lr*a)}var Br=Math.atan2(S,b)*x,br=e.arotation;G=(G-Br)*N.radDeg+y-br,G>180?G-=360:G<-180&&(G+=360),e.updateWorldTransformWith(c,f,br+G*l,p,v,0,0),br=r.arotation,V=((V+Br)*N.radDeg-r.ashearX)*x+_-br,V>180?V-=360:V<-180&&(V+=360),r.updateWorldTransformWith(b,S,br+V*l,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),PE=function(t){Ve(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n._target=null,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(r){this._target=r},enumerable:!1,configurable:!0}),e}(xm),OE=function(t){Ve(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n._target=null,n.positionMode=Mt.Fixed,n.spacingMode=ar.Fixed,n.rotateMode=zt.Chain,n.offsetRotation=0,n.position=0,n.spacing=0,n.mixRotate=0,n.mixX=0,n.mixY=0,n}return Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("SlotData not set.")},set:function(r){this._target=r},enumerable:!1,configurable:!0}),e}(xm),ar;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional"})(ar||(ar={}));var z3=function(){function t(e,r){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!e)throw new Error("data cannot be null.");if(!r)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var n=0,i=e.bones.length;n0){x=c/x*d;for(var p=1;p0?N.degRad:-N.degRad}for(var p=0,k=3;p0){var Z=M.a,$=M.c,F=M.b,G=M.d,V=0,U=0,H=0;if(o?V=E[k-1]:f[p+1]==0?V=E[k+2]:V=Math.atan2(j,B),V-=Math.atan2(F,Z),P){U=Math.cos(V),H=Math.sin(V);var ee=g.data.length;T+=(ee*(U*Z-H*F)-B)*r,A+=(ee*(H*Z+U*F)-j)*r}else V+=O;V>N.PI?V-=N.PI2:V<-N.PI&&(V+=N.PI2),V*=r,U=Math.cos(V),H=Math.sin(V),M.a=U*Z-H*F,M.c=U*$-H*G,M.b=H*Z+U*F,M.d=H*$+U*G}g.updateAppliedTransform()}}}},t.prototype.computeWorldPositions=function(e,r,n){var i=this.target,a=this.position,o=this.spaces,s=q.setArraySize(this.positions,r*3+2),u=this.world,l=e.closed,c=e.worldVerticesLength,f=c/6,h=t.NONE;if(!e.constantSpeed){var d=e.lengths;f-=l?1:2;var p=d[f];this.data.positionMode==Mt.Percent&&(a*=p);var v;switch(this.data.spacingMode){case ar.Percent:v=p;break;case ar.Proportional:v=p/r;break;default:v=1}u=q.setArraySize(this.world,8);for(var g=0,m=0,y=0;gp){h!=t.AFTER&&(h=t.AFTER,e.computeWorldVertices(i,c-6,4,u,0,2)),this.addAfterPosition(x-p,u,0,s,m);continue}for(;;y++){var b=d[y];if(!(x>b)){if(y==0)x/=b;else{var S=d[y-1];x=(x-S)/(b-S)}break}}y!=h&&(h=y,l&&y==f?(e.computeWorldVertices(i,c-4,4,u,0,2),e.computeWorldVertices(i,0,4,u,4,2)):e.computeWorldVertices(i,y*6+2,8,u,0,2)),this.addCurvePosition(x,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],s,m,n||g>0&&_==0)}return s}l?(c+=2,u=q.setArraySize(this.world,c),e.computeWorldVertices(i,2,c-4,u,0,2),e.computeWorldVertices(i,0,2,u,c-4,2),u[c-2]=u[0],u[c-1]=u[1]):(f--,c-=4,u=q.setArraySize(this.world,c),e.computeWorldVertices(i,2,c,u,0,2));for(var w=q.setArraySize(this.curves,f),E=0,T=u[0],A=u[1],O=0,P=0,k=0,M=0,B=0,j=0,z=0,J=0,Z=0,$=0,F=0,G=0,V=0,U=0,g=0,H=2;gE){this.addAfterPosition(x-E,u,c-4,s,m);continue}for(;;y++){var ye=w[y];if(!(x>ye)){if(y==0)x/=ye;else{var S=w[y-1];x=(x-S)/(ye-S)}break}}if(y!=h){h=y;var oe=y*6;for(T=u[oe],A=u[oe+1],O=u[oe+2],P=u[oe+3],k=u[oe+4],M=u[oe+5],B=u[oe+6],j=u[oe+7],z=(T-O*2+k)*.03,J=(A-P*2+M)*.03,Z=((O-k)*3-T+B)*.006,$=((P-M)*3-A+j)*.006,F=z*2+Z,G=J*2+$,V=(O-T)*.3+z+Z*.16666667,U=(P-A)*.3+J+$*.16666667,ae=Math.sqrt(V*V+U*U),ie[0]=ae,oe=1;oe<8;oe++)V+=F,U+=G,F+=Z,G+=$,ae+=Math.sqrt(V*V+U*U),ie[oe]=ae;V+=F,U+=G,ae+=Math.sqrt(V*V+U*U),ie[8]=ae,V+=F+Z,U+=G+$,ae+=Math.sqrt(V*V+U*U),ie[9]=ae,pe=0}for(x*=ae;;pe++){var _e=ie[pe];if(!(x>_e)){if(pe==0)x/=_e;else{var S=ie[pe-1];x=pe+(x-S)/(_e-S)}break}}this.addCurvePosition(x*.1,T,A,O,P,k,M,B,j,s,m,n||g>0&&_==0)}return s},t.prototype.addBeforePosition=function(e,r,n,i,a){var o=r[n],s=r[n+1],u=r[n+2]-o,l=r[n+3]-s,c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addAfterPosition=function(e,r,n,i,a){var o=r[n+2],s=r[n+3],u=o-r[n],l=s-r[n+1],c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addCurvePosition=function(e,r,n,i,a,o,s,u,l,c,f,h){if(e==0||isNaN(e)){c[f]=r,c[f+1]=n,c[f+2]=Math.atan2(a-n,i-r);return}var d=e*e,p=d*e,v=1-e,g=v*v,m=g*v,y=v*e,_=y*3,x=v*_,b=_*e,S=r*m+i*x+o*b+u*p,w=n*m+a*x+s*b+l*p;c[f]=S,c[f+1]=w,h&&(e<.001?c[f+2]=Math.atan2(a-n,i-r):c[f+2]=Math.atan2(w-(n*g+a*y*2+s*d),S-(r*g+i*y*2+o*d)))},t.NONE=-1,t.BEFORE=-2,t.AFTER=-3,t.epsilon=1e-5,t}(),W3=function(){function t(e,r){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!e)throw new Error("data cannot be null.");if(!r)throw new Error("bone cannot be null.");this.data=e,this.bone=r,this.color=new de,this.darkColor=e.darkColor?new de:null,this.setToSetupPose(),this.blendMode=this.data.blendMode}return t.prototype.getSkeleton=function(){return this.bone.skeleton},t.prototype.getAttachment=function(){return this.attachment},t.prototype.setAttachment=function(e){this.attachment!=e&&((!(e instanceof ia)||!(this.attachment instanceof ia)||e.timelineAttachment!=this.attachment.timelineAttachment)&&(this.deform.length=0),this.attachment=e,this.sequenceIndex=-1)},t.prototype.setToSetupPose=function(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null},t}(),Y3=function(){function t(e,r){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new gf,this.active=!1,!e)throw new Error("data cannot be null.");if(!r)throw new Error("skeleton cannot be null.");this.data=e,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY,this.bones=new Array;for(var n=0;n0?N.degRad:-N.degRad,v=this.data.offsetRotation*p,g=this.data.offsetShearY*p,m=this.bones,y=0,_=m.length;y<_;y++){var x=m[y],b=x.matrix;if(e!=0){var S=b.a,w=b.c,E=b.b,T=b.d,A=Math.atan2(h,c)-Math.atan2(E,S)+v;A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2),A*=e;var O=Math.cos(A),P=Math.sin(A);b.a=O*S-P*E,b.c=O*w-P*T,b.b=P*S+O*E,b.d=P*w+O*T}if(s){var k=this.temp;u.localToWorld(k.set(this.data.offsetX,this.data.offsetY)),b.tx+=(k.x-b.tx)*r,b.ty+=(k.y-b.ty)*n}if(i!=0){var M=Math.sqrt(b.a*b.a+b.b*b.b);M!=0&&(M=(M+(Math.sqrt(c*c+h*h)-M+this.data.offsetScaleX)*i)/M),b.a*=M,b.b*=M}if(a!=0){var M=Math.sqrt(b.c*b.c+b.d*b.d);M!=0&&(M=(M+(Math.sqrt(f*f+d*d)-M+this.data.offsetScaleY)*a)/M),b.c*=M,b.d*=M}if(o>0){var w=b.c,T=b.d,B=Math.atan2(T,w),A=Math.atan2(d,f)-Math.atan2(h,c)-(B-Math.atan2(b.b,b.a));A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2),A=B+(A+g)*o;var M=Math.sqrt(w*w+T*T);b.c=Math.cos(A)*M,b.d=Math.sin(A)*M}x.updateAppliedTransform()}},t.prototype.applyRelativeWorld=function(){for(var e=this.mixRotate,r=this.mixX,n=this.mixY,i=this.mixScaleX,a=this.mixScaleY,o=this.mixShearY,s=r!=0||n!=0,u=this.target,l=u.matrix,c=l.a,f=l.c,h=l.b,d=l.d,p=c*d-f*h>0?N.degRad:-N.degRad,v=this.data.offsetRotation*p,g=this.data.offsetShearY*p,m=this.bones,y=0,_=m.length;y<_;y++){var x=m[y],b=x.matrix;if(e!=0){var S=b.a,w=b.c,E=b.b,T=b.d,A=Math.atan2(h,c)+v;A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2),A*=e;var O=Math.cos(A),P=Math.sin(A);b.a=O*S-P*E,b.c=O*w-P*T,b.b=P*S+O*E,b.d=P*w+O*T}if(s){var k=this.temp;u.localToWorld(k.set(this.data.offsetX,this.data.offsetY)),b.tx+=k.x*r,b.ty+=k.y*n}if(i!=0){var M=(Math.sqrt(c*c+h*h)-1+this.data.offsetScaleX)*i+1;b.a*=M,b.b*=M}if(a!=0){var M=(Math.sqrt(f*f+d*d)-1+this.data.offsetScaleY)*a+1;b.c*=M,b.d*=M}if(o>0){var A=Math.atan2(d,f)-Math.atan2(h,c);A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2);var w=b.c,T=b.d;A=Math.atan2(T,w)+(A-N.PI/2+g)*o;var M=Math.sqrt(w*w+T*T);b.c=Math.cos(A)*M,b.d=Math.sin(A)*M}x.updateAppliedTransform()}},t.prototype.applyAbsoluteLocal=function(){for(var e=this.mixRotate,r=this.mixX,n=this.mixY,i=this.mixScaleX,a=this.mixScaleY,o=this.mixShearY,s=this.target,u=this.bones,l=0,c=u.length;l= 0.");if(!r)throw new Error("name cannot be null.");if(!n)throw new Error("boneData cannot be null.");this.index=e,this.name=r,this.boneData=n}return t}(),kE=function(t){Ve(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n._target=null,n.mixRotate=0,n.mixX=0,n.mixY=0,n.mixScaleX=0,n.mixScaleY=0,n.mixShearY=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(r){this._target=r},enumerable:!1,configurable:!0}),e}(xm),h1=function(){function t(e,r,n){this.slotIndex=e,this.name=r,this.attachment=n}return t}(),Mp=function(){function t(e){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,!e)throw new Error("name cannot be null.");this.name=e}return t.prototype.setAttachment=function(e,r,n){if(!n)throw new Error("attachment cannot be null.");var i=this.attachments;e>=i.length&&(i.length=e+1),i[e]||(i[e]={}),i[e][r]=n},t.prototype.addSkin=function(e){for(var r=0;r>4,e.readFloat())}i.push(p);break}}}var ct=e.readInt(!0);if(ct>0){for(var p=new Rl(ct),oi=n.slots.length,o=0;o=0;l--)Xn[l]=-1;for(var ja=q.newArray(oi-Fo,0),Ii=0,jr=0,l=0;l=0;l--)Xn[l]==-1&&(Xn[l]=ja[--jr]);p.setFrame(o,m,Xn)}i.push(p)}var Ua=e.readInt(!0);if(Ua>0){for(var p=new _m(Ua),o=0;o=0;Mi--)ki[Mi]==-1&&(ki[Mi]=va[--wu])}d.setFrame(p,Q(Ua,"time",0),ki)}a.push(d)}if(e.events){for(var d=new _m(e.events.length),p=0,ct=0;ct>1)*s;var u=r.bone.skeleton,l=r.deform,c=this.vertices,f=this.bones;if(!f){l.length>0&&(c=l);for(var h=r.bone.matrix,d=h.tx,p=h.ty,v=h.a,g=h.c,m=h.b,y=h.d,_=n,x=o;x=this.regions.length&&(n=this.regions.length-1);var i=this.regions[n];r.region!=i&&(r.region=i)},t.prototype.getPath=function(e,r){for(var n=e,i=(this.start+r).toString(),a=this.digits-i.length;a>0;a--)n+="0";return n+=i,n},t.nextID=function(){return t._nextID++},t._nextID=0,t}(),Pr;(function(t){t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse"})(Pr||(Pr={}));var nE=[Pr.hold,Pr.once,Pr.loop,Pr.pingpong,Pr.onceReverse,Pr.loopReverse,Pr.pingpongReverse],gm=function(){function t(e,r,n){if(this.timelines=[],this.timelineIds=new KD,!e)throw new Error("name cannot be null.");this.name=e,this.setTimelines(r),this.duration=n}return t.prototype.setTimelines=function(e){if(!e)throw new Error("timelines cannot be null.");this.timelines=e,this.timelineIds.clear();for(var r=0;r0&&(r%=this.duration));for(var l=this.timelines,c=0,f=l.length;cr)return i-1;return n-1},t.search=function(e,r,n){for(var i=e.length,a=n;ar)return a-n;return i-n},t}(),Pi=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,i)||this;return a.curves=q.newFloatArray(r+n*18),a.curves[r-1]=1,a}return e.prototype.setLinear=function(r){this.curves[r]=0},e.prototype.setStepped=function(r){this.curves[r]=1},e.prototype.shrink=function(r){var n=this.getFrameCount()+r*18;if(this.curves.length>n){var i=q.newFloatArray(n);q.arrayCopy(this.curves,0,i,0,n),this.curves=i}},e.prototype.setBezier=function(r,n,i,a,o,s,u,l,c,f,h){var d=this.curves,p=this.getFrameCount()+r*18;i==0&&(d[n]=2+p);for(var v=(a-s*2+l)*.03,g=(o-u*2+c)*.03,m=((s-l)*3-a+f)*.006,y=((u-c)*3-o+h)*.006,_=v*2+m,x=g*2+y,b=(s-a)*.3+v+m*.16666667,S=(u-o)*.3+g+y*.16666667,w=a+b,E=o+S,T=p+18;pr){var s=this.frames[n],u=this.frames[n+i];return u+(r-s)/(o[a]-s)*(o[a+1]-u)}var l=a+18;for(a+=2;a=r){var c=o[a-2],f=o[a-1];return f+(r-c)/(o[a]-c)*(o[a+1]-f)}n+=this.getFrameEntries();var h=o[l-2],d=o[l-1];return d+(r-h)/(this.frames[n]-h)*(this.frames[n+i]-d)},e}(Ht),Oi=function(t){Ve(e,t);function e(r,n,i){return t.call(this,r,n,[i])||this}return e.prototype.getFrameEntries=function(){return 2},e.prototype.setFrame=function(r,n,i){r<<=1,this.frames[r]=n,this.frames[r+1]=i},e.prototype.getCurveValue=function(r){for(var n=this.frames,i=n.length-2,a=2;a<=i;a+=2)if(n[a]>r){i=a-2;break}var o=this.curves[i>>1];switch(o){case 0:var s=n[i],u=n[i+1];return u+(r-s)/(n[i+2]-s)*(n[i+2+1]-u);case 1:return n[i+1]}return this.getBezierValue(r,i,1,o-2)},e}(Pi),ym=function(t){Ve(e,t);function e(r,n,i,a){return t.call(this,r,n,[i,a])||this}return e.prototype.getFrameEntries=function(){return 3},e.prototype.setFrame=function(r,n,i,a){r*=3,this.frames[r]=n,this.frames[r+1]=i,this.frames[r+2]=a},e}(Pi),Cf=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,n,nt.rotate+"|"+i)||this;return a.boneIndex=0,a.boneIndex=i,a}return e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.bones[this.boneIndex];if(l.active){var c=this.frames;if(i>2];switch(m){case 0:var y=c[g];d=c[g+1],p=c[g+2],v=c[g+3];var _=(i-y)/(c[g+4]-y);d+=(c[g+4+1]-d)*_,p+=(c[g+4+2]-p)*_,v+=(c[g+4+3]-v)*_;break;case 1:d=c[g+1],p=c[g+2],v=c[g+3];break;default:d=this.getBezierValue(i,g,1,m-2),p=this.getBezierValue(i,g,2,m+18-2),v=this.getBezierValue(i,g,3,m+18*2-2)}if(o==1)f.r=d,f.g=p,f.b=v;else{if(s==R.setup){var h=l.data.color;f.r=h.r,f.g=h.g,f.b=h.b}f.r+=(d-f.r)*o,f.g+=(p-f.g)*o,f.b+=(v-f.b)*o}}},e}(Pi),vE=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,n,nt.alpha+"|"+i)||this;return a.slotIndex=0,a.slotIndex=i,a}return e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.color;if(i>3];switch(w){case 0:var E=c[S];v=c[S+1],g=c[S+2],m=c[S+3],y=c[S+4],_=c[S+5],x=c[S+6],b=c[S+7];var T=(i-E)/(c[S+8]-E);v+=(c[S+8+1]-v)*T,g+=(c[S+8+2]-g)*T,m+=(c[S+8+3]-m)*T,y+=(c[S+8+4]-y)*T,_+=(c[S+8+5]-_)*T,x+=(c[S+8+6]-x)*T,b+=(c[S+8+7]-b)*T;break;case 1:v=c[S+1],g=c[S+2],m=c[S+3],y=c[S+4],_=c[S+5],x=c[S+6],b=c[S+7];break;default:v=this.getBezierValue(i,S,1,w-2),g=this.getBezierValue(i,S,2,w+18-2),m=this.getBezierValue(i,S,3,w+18*2-2),y=this.getBezierValue(i,S,4,w+18*3-2),_=this.getBezierValue(i,S,5,w+18*4-2),x=this.getBezierValue(i,S,6,w+18*5-2),b=this.getBezierValue(i,S,7,w+18*6-2)}if(o==1)f.set(v,g,m,y),h.r=_,h.g=x,h.b=b;else{if(s==R.setup){f.setFromColor(l.data.color);var p=l.data.darkColor;h.r=p.r,h.g=p.g,h.b=p.b}f.add((v-f.r)*o,(g-f.g)*o,(m-f.b)*o,(y-f.a)*o),h.r+=(_-h.r)*o,h.g+=(x-h.g)*o,h.b+=(b-h.b)*o}}},e}(Pi),gE=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,n,[nt.rgb+"|"+i,nt.rgb2+"|"+i])||this;return a.slotIndex=0,a.slotIndex=i,a}return e.prototype.getFrameEntries=function(){return 7},e.prototype.setFrame=function(r,n,i,a,o,s,u,l){r*=7,this.frames[r]=n,this.frames[r+1]=i,this.frames[r+2]=a,this.frames[r+3]=o,this.frames[r+4]=s,this.frames[r+5]=u,this.frames[r+6]=l},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=this.frames,f=l.color,h=l.darkColor;if(ir){var s=this.frames[n];return i[a+1]*(r-s)/(i[a]-s)}var u=a+18;for(a+=2;a=r){var l=i[a-2],c=i[a-1];return c+(r-l)/(i[a]-l)*(i[a+1]-c)}var f=i[u-2],h=i[u-1];return h+(1-h)*(r-f)/(this.frames[n+this.getFrameEntries()]-f)},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.getAttachment();if(c&&!(!(c instanceof ia)||c.timelineAttachment!=this.attachment)){var f=l.deform;f.length==0&&(s=R.setup);var h=this.vertices,d=h[0].length,p=this.frames;if(i=p[p.length-1]){var y=h[p.length-1];if(o==1)if(s==R.add){var v=c;if(v.bones)for(var x=0;xi)this.apply(r,n,Number.MAX_VALUE,a,o,s,u),n=-1;else if(n>=l[c-1])return;if(!(i0&&l[f-1]==h;)f--}for(;f=l[f];f++)a.push(this.events[f])}}},e.propertyIds=[""+nt.event],e}(Ht),Rl=function(t){Ve(e,t);function e(r){var n=t.call(this,r,e.propertyIds)||this;return n.drawOrders=new Array(r),n}return e.prototype.getFrameCount=function(){return this.frames.length},e.prototype.setFrame=function(r,n,i){this.frames[r]=n,this.drawOrders[r]=i},e.prototype.apply=function(r,n,i,a,o,s,u){if(u==je.mixOut){s==R.setup&&q.arrayCopy(r.slots,0,r.drawOrder,0,r.slots.length);return}if(i>2];switch(v){case 0:var g=c[p];f=c[p+1],h=c[p+2],d=c[p+3];var m=(i-g)/(c[p+4]-g);f+=(c[p+4+1]-f)*m,h+=(c[p+4+2]-h)*m,d+=(c[p+4+3]-d)*m;break;case 1:f=c[p+1],h=c[p+2],d=c[p+3];break;default:f=this.getBezierValue(i,p,1,v-2),h=this.getBezierValue(i,p,2,v+18-2),d=this.getBezierValue(i,p,3,v+18*2-2)}if(s==R.setup){var y=l.data;l.mixRotate=y.mixRotate+(f-y.mixRotate)*o,l.mixX=y.mixX+(h-y.mixX)*o,l.mixY=y.mixY+(d-y.mixY)*o}else l.mixRotate+=(f-l.mixRotate)*o,l.mixX+=(h-l.mixX)*o,l.mixY+=(d-l.mixY)*o}},e}(Pi),EE=function(t){Ve(e,t);function e(r,n,i){var a=t.call(this,r,[nt.sequence+"|"+n+"|"+i.sequence.id])||this;return a.slotIndex=n,a.attachment=i,a}return e.prototype.getFrameEntries=function(){return e.ENTRIES},e.prototype.getSlotIndex=function(){return this.slotIndex},e.prototype.getAttachment=function(){return this.attachment},e.prototype.setFrame=function(r,n,i,a,o){var s=this.frames;r*=e.ENTRIES,s[r]=n,s[r+e.MODE]=i|a<<4,s[r+e.DELAY]=o},e.prototype.apply=function(r,n,i,a,o,s,u){var l=r.slots[this.slotIndex];if(l.bone.active){var c=l.attachment,f=this.attachment;if(!(c!=f&&(!(c instanceof ia)||c.timelineAttachment!=f))){var h=this.frames;if(i>4,y=this.attachment.sequence.regions.length,_=nE[v&15];if(_!=Pr.hold)switch(m+=(i-p)/g+1e-5|0,_){case Pr.once:m=Math.min(y-1,m);break;case Pr.loop:m%=y;break;case Pr.pingpong:{var x=(y<<1)-2;m=x==0?0:m%x,m>=y&&(m=x-m);break}case Pr.onceReverse:m=Math.max(y-1-m,0);break;case Pr.loopReverse:m=y-1-m%y;break;case Pr.pingpongReverse:{var x=(y<<1)-2;m=x==0?0:(m+y-1)%x,m>=y&&(m=x-m)}}l.sequenceIndex=m}}}},e.ENTRIES=3,e.MODE=1,e.DELAY=2,e}(Ht),$3=function(){function t(e){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new G3(this),this.propertyIDs=new KD,this.animationsChanged=!1,this.trackEntryPool=new hm(function(){return new V3}),this.data=e}return t.emptyAnimation=function(){return t._emptyAnimation},t.prototype.update=function(e){e*=this.timeScale;for(var r=this.tracks,n=0,i=r.length;n0){if(a.delay-=o,a.delay>0)continue;o=-a.delay,a.delay=0}var s=a.next;if(s){var u=a.trackLast-s.delay;if(u>=0){for(s.delay=0,s.trackTime+=a.timeScale==0?0:(u/a.timeScale+e)*s.timeScale,a.trackTime+=o,this.setCurrent(n,s,!0);s.mixingFrom;)s.mixTime+=e,s=s.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&!a.mixingFrom){r[n]=null,this.queue.end(a),this.clearNext(a);continue}if(a.mixingFrom&&this.updateMixingFrom(a,e)){var l=a.mixingFrom;for(a.mixingFrom=null,l&&(l.mixingTo=null);l;)this.queue.end(l),l=l.mixingFrom}a.trackTime+=o}}this.queue.drain()},t.prototype.updateMixingFrom=function(e,r){var n=e.mixingFrom;if(!n)return!0;var i=this.updateMixingFrom(n,r);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,e.mixTime>0&&e.mixTime>=e.mixDuration?((n.totalAlpha==0||e.mixDuration==0)&&(e.mixingFrom=n.mixingFrom,n.mixingFrom&&(n.mixingFrom.mixingTo=e),e.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=r*n.timeScale,e.mixTime+=r,!1)},t.prototype.apply=function(e){if(!e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,n=this.tracks,i=!1,a=0,o=n.length;a0)){i=!0;var u=a==0?R.first:s.mixBlend,l=s.alpha;s.mixingFrom?l*=this.applyMixingFrom(s,e,u):s.trackTime>=s.trackEnd&&!s.next&&(l=0);var c=s.animationLast,f=s.getAnimationTime(),h=f,d=r;s.reverse&&(h=s.animation.duration-h,d=null);var p=s.animation.timelines,v=p.length;if(a==0&&l==1||u==R.add)for(var g=0;g1&&(a=1),n!=R.first&&(n=i.mixBlend));var o=a0&&this.queueEvents(i,d),this.events.length=0,i.nextAnimationLast=d,i.nextTrackLast=i.trackTime,a},t.prototype.applyAttachmentTimeline=function(e,r,n,i,a){var o=r.slots[e.slotIndex];o.bone.active&&(n0,y=v>=0;N.signum(g)!=N.signum(p)&&Math.abs(g)<=90&&(Math.abs(v)>180&&(v+=360*N.signum(v)),y=m),d=p+v-v%360,y!=m&&(d+=360*N.signum(v)),o[s]=d}o[s+1]=p,l.rotation=f+d*i}},t.prototype.queueEvents=function(e,r){for(var n=e.animationStart,i=e.animationEnd,a=i-n,o=e.trackLast%a,s=this.events,u=0,l=s.length;ui||this.queue.event(e,c)}var f=!1;for(e.loop?f=a==0||o>e.trackTime%a:f=r>=i&&e.animationLast=this.tracks.length)){var r=this.tracks[e];if(r){this.queue.end(r),this.clearNext(r);for(var n=r;;){var i=n.mixingFrom;if(!i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[r.trackIndex]=null,this.queue.drain()}}},t.prototype.setCurrent=function(e,r,n){var i=this.expandToIndex(e);this.tracks[e]=r,r.previous=null,i&&(n&&this.queue.interrupt(i),r.mixingFrom=i,i.mixingTo=r,r.mixTime=0,i.mixingFrom&&i.mixDuration>0&&(r.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(r)},t.prototype.setAnimation=function(e,r,n){n===void 0&&(n=!1);var i=this.data.skeletonData.findAnimation(r);if(!i)throw new Error("Animation not found: "+r);return this.setAnimationWith(e,i,n)},t.prototype.setAnimationWith=function(e,r,n){if(n===void 0&&(n=!1),!r)throw new Error("animation cannot be null.");var i=!0,a=this.expandToIndex(e);a&&(a.nextTrackLast==-1?(this.tracks[e]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.clearNext(a),a=a.mixingFrom,i=!1):this.clearNext(a));var o=this.trackEntry(e,r,n,a);return this.setCurrent(e,o,i),this.queue.drain(),o},t.prototype.addAnimation=function(e,r,n,i){n===void 0&&(n=!1),i===void 0&&(i=0);var a=this.data.skeletonData.findAnimation(r);if(!a)throw new Error("Animation not found: "+r);return this.addAnimationWith(e,a,n,i)},t.prototype.addAnimationWith=function(e,r,n,i){if(n===void 0&&(n=!1),i===void 0&&(i=0),!r)throw new Error("animation cannot be null.");var a=this.expandToIndex(e);if(a)for(;a.next;)a=a.next;var o=this.trackEntry(e,r,n,a);return a?(a.next=o,o.previous=a,i<=0&&(i+=a.getTrackComplete()-o.mixDuration)):(this.setCurrent(e,o,!0),this.queue.drain()),o.delay=i,o},t.prototype.setEmptyAnimation=function(e,r){r===void 0&&(r=0);var n=this.setAnimationWith(e,t.emptyAnimation(),!1);return n.mixDuration=r,n.trackEnd=r,n},t.prototype.addEmptyAnimation=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=0);var i=this.addAnimationWith(e,t.emptyAnimation(),!1,n);return n<=0&&(i.delay+=i.mixDuration-r),i.mixDuration=r,i.trackEnd=r,i},t.prototype.setEmptyAnimations=function(e){e===void 0&&(e=0);var r=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n0){a[u]=n_e,o[u]=f;continue e}break}a[u]=Vy}}},t.prototype.getCurrent=function(e){return e>=this.tracks.length?null:this.tracks[e]},t.prototype.addListener=function(e){if(!e)throw new Error("listener cannot be null.");this.listeners.push(e)},t.prototype.removeListener=function(e){var r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)},t.prototype.clearListeners=function(){this.listeners.length=0},t.prototype.clearListenerNotifications=function(){this.queue.clear()},t.prototype.setAnimationByName=function(e,r,n){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(e,r,n)},t.prototype.addAnimationByName=function(e,r,n,i){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(e,r,n,i)},t.prototype.hasAnimation=function(e){var r=this.data.skeletonData.findAnimation(e);return r!==null},t.prototype.hasAnimationByName=function(e){return t.deprecatedWarning3||(t.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(e)},t._emptyAnimation=new gm("",[],0),t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t.deprecatedWarning3=!1,t}(),V3=function(){function t(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=R.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return t.prototype.reset=function(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},t.prototype.getAnimationTime=function(){if(this.loop){var e=this.animationEnd-this.animationStart;return e==0?this.animationStart:this.trackTime%e+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},t.prototype.setAnimationLast=function(e){this.animationLast=e,this.nextAnimationLast=e},t.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},t.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},t.prototype.getTrackComplete=function(){var e=this.animationEnd-this.animationStart;if(e!=0){if(this.loop)return e*(1+(this.trackTime/e|0));if(this.trackTime1e-4?(S=Math.abs(p*m-v*g)/S,p/=c,g/=f,v=g*S,m=p*S,w=Math.atan2(g,p)*N.radDeg):(p=0,g=0,w=90-Math.atan2(m,v)*N.radDeg);var E=n+o-w,T=n+s-w+90,y=N.cosDeg(E)*i,_=N.cosDeg(T)*a,x=N.sinDeg(E)*i,b=N.sinDeg(T)*a;l.a=p*y-v*x,l.c=p*_-v*b,l.b=g*y+m*x,l.d=g*_+m*b;break}case Fe.NoScale:case Fe.NoScaleOrReflection:{var A=N.cosDeg(n),O=N.sinDeg(n),P=(p*A+v*O)/c,k=(g*A+m*O)/f,S=Math.sqrt(P*P+k*k);S>1e-5&&(S=1/S),P*=S,k*=S,S=Math.sqrt(P*P+k*k),this.data.transformMode==Fe.NoScale&&p*m-v*g<0!=(c<0!=f<0)&&(S=-S);var M=Math.PI/2+Math.atan2(k,P),B=Math.cos(M)*S,j=Math.sin(M)*S,y=N.cosDeg(o)*i,_=N.cosDeg(90+s)*a,x=N.sinDeg(o)*i,b=N.sinDeg(90+s)*a;l.a=P*y+B*x,l.c=P*_+B*b,l.b=k*y+j*x,l.d=k*_+j*b;break}}l.a*=c,l.c*=c,l.b*=f,l.d*=f},t.prototype.setToSetupPose=function(){var e=this.data;this.x=e.x,this.y=e.y,this.rotation=e.rotation,this.scaleX=e.scaleX,this.scaleY=e.scaleY,this.shearX=e.shearX,this.shearY=e.shearY},t.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*N.radDeg},t.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*N.radDeg},t.prototype.getWorldScaleX=function(){var e=this.matrix;return Math.sqrt(e.a*e.a+e.b*e.b)},t.prototype.getWorldScaleY=function(){var e=this.matrix;return Math.sqrt(e.c*e.c+e.d*e.d)},t.prototype.updateAppliedTransform=function(){var e=this.parent,r=this.matrix;if(!e){this.ax=r.tx-this.skeleton.x,this.ay=r.ty-this.skeleton.y,this.arotation=Math.atan2(r.b,r.a)*N.radDeg,this.ascaleX=Math.sqrt(r.a*r.a+r.b*r.b),this.ascaleY=Math.sqrt(r.c*r.c+r.d*r.d),this.ashearX=0,this.ashearY=Math.atan2(r.a*r.c+r.b*r.d,r.a*r.d-r.b*r.c)*N.radDeg;return}var n=e.matrix,i=1/(n.a*n.d-n.b*n.c),a=r.tx-n.tx,o=r.ty-n.ty;this.ax=a*n.d*i-o*n.c*i,this.ay=o*n.a*i-a*n.b*i;var s=i*n.d,u=i*n.a,l=i*n.c,c=i*n.b,f=s*r.a-l*r.b,h=s*r.c-l*r.d,d=u*r.b-c*r.a,p=u*r.d-c*r.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+d*d),this.ascaleX>1e-4){var v=f*p-h*d;this.ascaleY=v/this.ascaleX,this.ashearY=Math.atan2(f*h+d*p,v)*N.radDeg,this.arotation=Math.atan2(d,f)*N.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(h*h+p*p),this.ashearY=0,this.arotation=90-Math.atan2(p,h)*N.radDeg},t.prototype.worldToLocal=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=1/(n*o-i*a),u=e.x-r.tx,l=e.y-r.ty;return e.x=u*o*s-l*i*s,e.y=l*n*s-u*a*s,e},t.prototype.localToWorld=function(e){var r=this.matrix,n=e.x,i=e.y;return e.x=n*r.a+i*r.c+r.tx,e.y=n*r.b+i*r.d+r.ty,e},t.prototype.worldToLocalRotation=function(e){var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(i.a*r-i.b*n,i.d*n-i.c*r)*N.radDeg},t.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var r=N.sinDeg(e),n=N.cosDeg(e),i=this.matrix;return Math.atan2(n*i.b+r*i.d,n*i.a+r*i.c)*N.radDeg},t.prototype.rotateWorld=function(e){var r=this.matrix,n=r.a,i=r.c,a=r.b,o=r.d,s=N.cosDeg(e),u=N.sinDeg(e);r.a=s*n-u*a,r.c=s*i-u*o,r.b=u*n+s*a,r.d=u*i+s*o},t}(),AE=function(){function t(e,r,n){if(this.index=0,this.parent=null,this.length=0,this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=Fe.Normal,this.skinRequired=!1,this.color=new de,e<0)throw new Error("index must be >= 0.");if(!r)throw new Error("name cannot be null.");this.index=e,this.name=r,this.parent=n}return t}(),xm=function(){function t(e,r,n){this.name=e,this.order=r,this.skinRequired=n}return t}(),CE=function(){function t(e,r){if(this.intValue=0,this.floatValue=0,this.stringValue=null,this.time=0,this.volume=0,this.balance=0,!r)throw new Error("data cannot be null.");this.time=e,this.data=r}return t}(),PE=function(){function t(e){this.intValue=0,this.floatValue=0,this.stringValue=null,this.audioPath=null,this.volume=0,this.balance=0,this.name=e}return t}(),z3=function(){function t(e,r){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,!e)throw new Error("data cannot be null.");if(!r)throw new Error("skeleton cannot be null.");this.data=e,this.mix=e.mix,this.softness=e.softness,this.bendDirection=e.bendDirection,this.compress=e.compress,this.stretch=e.stretch,this.bones=new Array;for(var n=0;n180?d-=360:d<-180&&(d+=360);var E=e.ascaleX,T=e.ascaleY;if(i||a){switch(e.data.transformMode){case Fe.NoScale:case Fe.NoScaleOrReflection:p=r-e.worldX,v=n-e.worldY}var A=e.data.length*E,O=Math.sqrt(p*p+v*v);if(i&&OA&&A>1e-4){var y=(O/A-1)*s+1;E*=y,o&&(T*=y)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*s,E,T,e.ashearX,e.ashearY)},t.prototype.apply2=function(e,r,n,i,a,o,s,u,l){var c=e.ax,f=e.ay,h=e.ascaleX,d=e.ascaleY,p=h,v=d,g=r.ascaleX,m=e.matrix,y=0,_=0,x=0;h<0?(h=-h,y=180,x=-1):(y=0,x=1),d<0&&(d=-d,x=-x),g<0?(g=-g,_=180):_=0;var b=r.ax,S=0,w=0,E=0,T=m.a,A=m.c,O=m.b,P=m.d,k=Math.abs(h-d)<=1e-4;!k||o?(S=0,w=T*b+m.tx,E=O*b+m.ty):(S=r.ay,w=T*b+A*S+m.tx,E=O*b+P*S+m.ty);var M=e.parent.matrix;if(!M)throw new Error("IK parent must itself have a parent.");T=M.a,A=M.c,O=M.b,P=M.d;var B=1/(T*P-A*O),j=w-M.tx,z=E-M.ty,J=(j*P-z*A)*B-c,Z=(z*T-j*O)*B-f,$=Math.sqrt(J*J+Z*Z),F=r.data.length*g,G,V;if($<1e-4){this.apply1(e,n,i,!1,o,!1,l),r.updateWorldTransformWith(b,S,0,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY);return}j=n-M.tx,z=i-M.ty;var U=(j*P-z*A)*B-c,H=(z*T-j*O)*B-f,ee=U*U+H*H;if(u!=0){u*=h*(g+1)*.5;var ie=Math.sqrt(ee),ae=ie-$-F*h+u;if(ae>0){var pe=Math.min(1,ae/(u*2))-1;pe=(ae-u*(1-pe*pe))/ie,U-=pe*U,H-=pe*H,ee=U*U+H*H}}e:if(k){F*=h;var ye=(ee-$*$-F*F)/(2*$*F);ye<-1?(ye=-1,V=Math.PI*a):ye>1?(ye=1,V=0,o&&(T=(Math.sqrt(ee)/($+F)-1)*l+1,p*=T,s&&(v*=T))):V=Math.acos(ye)*a,T=$+F*ye,A=F*Math.sin(V),G=Math.atan2(H*T-U*A,U*T+H*A)}else{T=h*F,A=d*F;var oe=T*T,_e=A*A,Ce=Math.atan2(H,U);O=_e*$*$+oe*ee-oe*_e;var be=-2*_e*$,Oe=_e-oe;if(P=be*be-4*Oe*O,P>=0){var ke=Math.sqrt(P);be<0&&(ke=-ke),ke=-(be+ke)*.5;var we=ke/Oe,Xe=O/ke,tt=Math.abs(we)=-1&&O<=1&&(O=Math.acos(O),j=T*Math.cos(O)+$,z=A*Math.sin(O),P=j*j+z*z,Pur&&(lr=O,ur=P,Dr=j,br=z)),ee<=(qt+ur)*.5?(G=Ce-Math.atan2(_t*a,$t),V=Et*a):(G=Ce-Math.atan2(br*a,Dr),V=lr*a)}var Br=Math.atan2(S,b)*x,Sr=e.arotation;G=(G-Br)*N.radDeg+y-Sr,G>180?G-=360:G<-180&&(G+=360),e.updateWorldTransformWith(c,f,Sr+G*l,p,v,0,0),Sr=r.arotation,V=((V+Br)*N.radDeg-r.ashearX)*x+_-Sr,V>180?V-=360:V<-180&&(V+=360),r.updateWorldTransformWith(b,S,Sr+V*l,r.ascaleX,r.ascaleY,r.ashearX,r.ashearY)},t}(),OE=function(t){Ve(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n._target=null,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(r){this._target=r},enumerable:!1,configurable:!0}),e}(xm),RE=function(t){Ve(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n._target=null,n.positionMode=Mt.Fixed,n.spacingMode=ar.Fixed,n.rotateMode=Wt.Chain,n.offsetRotation=0,n.position=0,n.spacing=0,n.mixRotate=0,n.mixX=0,n.mixY=0,n}return Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("SlotData not set.")},set:function(r){this._target=r},enumerable:!1,configurable:!0}),e}(xm),ar;(function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional"})(ar||(ar={}));var W3=function(){function t(e,r){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!e)throw new Error("data cannot be null.");if(!r)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var n=0,i=e.bones.length;n0){x=c/x*d;for(var p=1;p0?N.degRad:-N.degRad}for(var p=0,k=3;p0){var Z=M.a,$=M.c,F=M.b,G=M.d,V=0,U=0,H=0;if(o?V=E[k-1]:f[p+1]==0?V=E[k+2]:V=Math.atan2(j,B),V-=Math.atan2(F,Z),P){U=Math.cos(V),H=Math.sin(V);var ee=g.data.length;T+=(ee*(U*Z-H*F)-B)*r,A+=(ee*(H*Z+U*F)-j)*r}else V+=O;V>N.PI?V-=N.PI2:V<-N.PI&&(V+=N.PI2),V*=r,U=Math.cos(V),H=Math.sin(V),M.a=U*Z-H*F,M.c=U*$-H*G,M.b=H*Z+U*F,M.d=H*$+U*G}g.updateAppliedTransform()}}}},t.prototype.computeWorldPositions=function(e,r,n){var i=this.target,a=this.position,o=this.spaces,s=q.setArraySize(this.positions,r*3+2),u=this.world,l=e.closed,c=e.worldVerticesLength,f=c/6,h=t.NONE;if(!e.constantSpeed){var d=e.lengths;f-=l?1:2;var p=d[f];this.data.positionMode==Mt.Percent&&(a*=p);var v;switch(this.data.spacingMode){case ar.Percent:v=p;break;case ar.Proportional:v=p/r;break;default:v=1}u=q.setArraySize(this.world,8);for(var g=0,m=0,y=0;gp){h!=t.AFTER&&(h=t.AFTER,e.computeWorldVertices(i,c-6,4,u,0,2)),this.addAfterPosition(x-p,u,0,s,m);continue}for(;;y++){var b=d[y];if(!(x>b)){if(y==0)x/=b;else{var S=d[y-1];x=(x-S)/(b-S)}break}}y!=h&&(h=y,l&&y==f?(e.computeWorldVertices(i,c-4,4,u,0,2),e.computeWorldVertices(i,0,4,u,4,2)):e.computeWorldVertices(i,y*6+2,8,u,0,2)),this.addCurvePosition(x,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],s,m,n||g>0&&_==0)}return s}l?(c+=2,u=q.setArraySize(this.world,c),e.computeWorldVertices(i,2,c-4,u,0,2),e.computeWorldVertices(i,0,2,u,c-4,2),u[c-2]=u[0],u[c-1]=u[1]):(f--,c-=4,u=q.setArraySize(this.world,c),e.computeWorldVertices(i,2,c,u,0,2));for(var w=q.setArraySize(this.curves,f),E=0,T=u[0],A=u[1],O=0,P=0,k=0,M=0,B=0,j=0,z=0,J=0,Z=0,$=0,F=0,G=0,V=0,U=0,g=0,H=2;gE){this.addAfterPosition(x-E,u,c-4,s,m);continue}for(;;y++){var ye=w[y];if(!(x>ye)){if(y==0)x/=ye;else{var S=w[y-1];x=(x-S)/(ye-S)}break}}if(y!=h){h=y;var oe=y*6;for(T=u[oe],A=u[oe+1],O=u[oe+2],P=u[oe+3],k=u[oe+4],M=u[oe+5],B=u[oe+6],j=u[oe+7],z=(T-O*2+k)*.03,J=(A-P*2+M)*.03,Z=((O-k)*3-T+B)*.006,$=((P-M)*3-A+j)*.006,F=z*2+Z,G=J*2+$,V=(O-T)*.3+z+Z*.16666667,U=(P-A)*.3+J+$*.16666667,ae=Math.sqrt(V*V+U*U),ie[0]=ae,oe=1;oe<8;oe++)V+=F,U+=G,F+=Z,G+=$,ae+=Math.sqrt(V*V+U*U),ie[oe]=ae;V+=F,U+=G,ae+=Math.sqrt(V*V+U*U),ie[8]=ae,V+=F+Z,U+=G+$,ae+=Math.sqrt(V*V+U*U),ie[9]=ae,pe=0}for(x*=ae;;pe++){var _e=ie[pe];if(!(x>_e)){if(pe==0)x/=_e;else{var S=ie[pe-1];x=pe+(x-S)/(_e-S)}break}}this.addCurvePosition(x*.1,T,A,O,P,k,M,B,j,s,m,n||g>0&&_==0)}return s},t.prototype.addBeforePosition=function(e,r,n,i,a){var o=r[n],s=r[n+1],u=r[n+2]-o,l=r[n+3]-s,c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addAfterPosition=function(e,r,n,i,a){var o=r[n+2],s=r[n+3],u=o-r[n],l=s-r[n+1],c=Math.atan2(l,u);i[a]=o+e*Math.cos(c),i[a+1]=s+e*Math.sin(c),i[a+2]=c},t.prototype.addCurvePosition=function(e,r,n,i,a,o,s,u,l,c,f,h){if(e==0||isNaN(e)){c[f]=r,c[f+1]=n,c[f+2]=Math.atan2(a-n,i-r);return}var d=e*e,p=d*e,v=1-e,g=v*v,m=g*v,y=v*e,_=y*3,x=v*_,b=_*e,S=r*m+i*x+o*b+u*p,w=n*m+a*x+s*b+l*p;c[f]=S,c[f+1]=w,h&&(e<.001?c[f+2]=Math.atan2(a-n,i-r):c[f+2]=Math.atan2(w-(n*g+a*y*2+s*d),S-(r*g+i*y*2+o*d)))},t.NONE=-1,t.BEFORE=-2,t.AFTER=-3,t.epsilon=1e-5,t}(),Y3=function(){function t(e,r){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!e)throw new Error("data cannot be null.");if(!r)throw new Error("bone cannot be null.");this.data=e,this.bone=r,this.color=new de,this.darkColor=e.darkColor?new de:null,this.setToSetupPose(),this.blendMode=this.data.blendMode}return t.prototype.getSkeleton=function(){return this.bone.skeleton},t.prototype.getAttachment=function(){return this.attachment},t.prototype.setAttachment=function(e){this.attachment!=e&&((!(e instanceof ia)||!(this.attachment instanceof ia)||e.timelineAttachment!=this.attachment.timelineAttachment)&&(this.deform.length=0),this.attachment=e,this.sequenceIndex=-1)},t.prototype.setToSetupPose=function(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null},t}(),H3=function(){function t(e,r){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new gf,this.active=!1,!e)throw new Error("data cannot be null.");if(!r)throw new Error("skeleton cannot be null.");this.data=e,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY,this.bones=new Array;for(var n=0;n0?N.degRad:-N.degRad,v=this.data.offsetRotation*p,g=this.data.offsetShearY*p,m=this.bones,y=0,_=m.length;y<_;y++){var x=m[y],b=x.matrix;if(e!=0){var S=b.a,w=b.c,E=b.b,T=b.d,A=Math.atan2(h,c)-Math.atan2(E,S)+v;A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2),A*=e;var O=Math.cos(A),P=Math.sin(A);b.a=O*S-P*E,b.c=O*w-P*T,b.b=P*S+O*E,b.d=P*w+O*T}if(s){var k=this.temp;u.localToWorld(k.set(this.data.offsetX,this.data.offsetY)),b.tx+=(k.x-b.tx)*r,b.ty+=(k.y-b.ty)*n}if(i!=0){var M=Math.sqrt(b.a*b.a+b.b*b.b);M!=0&&(M=(M+(Math.sqrt(c*c+h*h)-M+this.data.offsetScaleX)*i)/M),b.a*=M,b.b*=M}if(a!=0){var M=Math.sqrt(b.c*b.c+b.d*b.d);M!=0&&(M=(M+(Math.sqrt(f*f+d*d)-M+this.data.offsetScaleY)*a)/M),b.c*=M,b.d*=M}if(o>0){var w=b.c,T=b.d,B=Math.atan2(T,w),A=Math.atan2(d,f)-Math.atan2(h,c)-(B-Math.atan2(b.b,b.a));A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2),A=B+(A+g)*o;var M=Math.sqrt(w*w+T*T);b.c=Math.cos(A)*M,b.d=Math.sin(A)*M}x.updateAppliedTransform()}},t.prototype.applyRelativeWorld=function(){for(var e=this.mixRotate,r=this.mixX,n=this.mixY,i=this.mixScaleX,a=this.mixScaleY,o=this.mixShearY,s=r!=0||n!=0,u=this.target,l=u.matrix,c=l.a,f=l.c,h=l.b,d=l.d,p=c*d-f*h>0?N.degRad:-N.degRad,v=this.data.offsetRotation*p,g=this.data.offsetShearY*p,m=this.bones,y=0,_=m.length;y<_;y++){var x=m[y],b=x.matrix;if(e!=0){var S=b.a,w=b.c,E=b.b,T=b.d,A=Math.atan2(h,c)+v;A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2),A*=e;var O=Math.cos(A),P=Math.sin(A);b.a=O*S-P*E,b.c=O*w-P*T,b.b=P*S+O*E,b.d=P*w+O*T}if(s){var k=this.temp;u.localToWorld(k.set(this.data.offsetX,this.data.offsetY)),b.tx+=k.x*r,b.ty+=k.y*n}if(i!=0){var M=(Math.sqrt(c*c+h*h)-1+this.data.offsetScaleX)*i+1;b.a*=M,b.b*=M}if(a!=0){var M=(Math.sqrt(f*f+d*d)-1+this.data.offsetScaleY)*a+1;b.c*=M,b.d*=M}if(o>0){var A=Math.atan2(d,f)-Math.atan2(h,c);A>N.PI?A-=N.PI2:A<-N.PI&&(A+=N.PI2);var w=b.c,T=b.d;A=Math.atan2(T,w)+(A-N.PI/2+g)*o;var M=Math.sqrt(w*w+T*T);b.c=Math.cos(A)*M,b.d=Math.sin(A)*M}x.updateAppliedTransform()}},t.prototype.applyAbsoluteLocal=function(){for(var e=this.mixRotate,r=this.mixX,n=this.mixY,i=this.mixScaleX,a=this.mixScaleY,o=this.mixShearY,s=this.target,u=this.bones,l=0,c=u.length;l= 0.");if(!r)throw new Error("name cannot be null.");if(!n)throw new Error("boneData cannot be null.");this.index=e,this.name=r,this.boneData=n}return t}(),ME=function(t){Ve(e,t);function e(r){var n=t.call(this,r,0,!1)||this;return n.bones=new Array,n._target=null,n.mixRotate=0,n.mixX=0,n.mixY=0,n.mixScaleX=0,n.mixScaleY=0,n.mixShearY=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return Object.defineProperty(e.prototype,"target",{get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(r){this._target=r},enumerable:!1,configurable:!0}),e}(xm),d1=function(){function t(e,r,n){this.slotIndex=e,this.name=r,this.attachment=n}return t}(),Mp=function(){function t(e){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,!e)throw new Error("name cannot be null.");this.name=e}return t.prototype.setAttachment=function(e,r,n){if(!n)throw new Error("attachment cannot be null.");var i=this.attachments;e>=i.length&&(i.length=e+1),i[e]||(i[e]={}),i[e][r]=n},t.prototype.addSkin=function(e){for(var r=0;r>4,e.readFloat())}i.push(p);break}}}var ct=e.readInt(!0);if(ct>0){for(var p=new Rl(ct),oi=n.slots.length,o=0;o=0;l--)Xn[l]=-1;for(var ja=q.newArray(oi-Fo,0),Ii=0,jr=0,l=0;l=0;l--)Xn[l]==-1&&(Xn[l]=ja[--jr]);p.setFrame(o,m,Xn)}i.push(p)}var Ua=e.readInt(!0);if(Ua>0){for(var p=new _m(Ua),o=0;o=0;Mi--)ki[Mi]==-1&&(ki[Mi]=va[--wu])}d.setFrame(p,Q(Ua,"time",0),ki)}a.push(d)}if(e.events){for(var d=new _m(e.events.length),p=0,ct=0;ct{this.updateFps(),setTimeout(i,1e4)};i();const a=()=>{setTimeout(a,500),this.callLoader()};a()}getFigureObjects(){return this.figureObjects}getAllLockedObject(){return this.lockTransformTarget}registerAnimation(e,r,n="default"){var i;e&&(this.stageAnimations.push({uuid:Hs(),animationObject:e,key:r,targetKey:n,type:"common"}),this.lockStageObject(n),e.setStartState(),(i=this.currentApp)==null||i.ticker.add(e.tickerFunc))}registerPresetAnimation(e,r,n="default",i){var o;if(!e)return;const a=i.find(s=>s.target===n);if(a){const s=this.getStageObjByKey(n);if(s){const u=s.pixiContainer;Object.assign(u,a.transform)}return}this.stageAnimations.push({uuid:Hs(),animationObject:e,key:r,targetKey:n,type:"preset"}),this.lockStageObject(n),e.setStartState(),(o=this.currentApp)==null||o.ticker.add(e.tickerFunc)}stopPresetAnimationOnTarget(e){const r=this.stageAnimations.find(n=>n.targetKey===e&&n.type==="preset");r&&this.removeAnimation(r.key)}removeAnimation(e){var n;const r=this.stageAnimations.findIndex(i=>i.key===e);if(r>=0){const i=this.stageAnimations[r];(n=this.currentApp)==null||n.ticker.remove(i.animationObject.tickerFunc),i.animationObject.setEndState(),this.unlockStageObject(i.targetKey??"default"),this.stageAnimations.splice(r,1)}}removeAnimationWithSetEffects(e){var n,i,a;const r=this.stageAnimations.findIndex(o=>o.key===e);if(r>=0){const o=this.stageAnimations[r];(n=this.currentApp)==null||n.ticker.remove(o.animationObject.tickerFunc),o.animationObject.setEndState();const s=((a=(i=o.animationObject).getEndFilterEffect)==null?void 0:a.call(i))??{};if(this.unlockStageObject(o.targetKey??"default"),o.targetKey){const u=this.getStageObjByKey(o.targetKey);if(u){const l={alpha:u.pixiContainer.alphaFilterVal,scale:{x:u.pixiContainer.scale.x,y:u.pixiContainer.scale.y},position:{x:u.pixiContainer.x,y:u.pixiContainer.y},rotation:u.pixiContainer.rotation,blur:u.pixiContainer.blur,...s};let c={target:o.targetKey,transform:l};te.dispatch(Tr.updateEffect(c))}}this.stageAnimations.splice(r,1)}}performMouthSyncAnimation(e,r,n,i){var s;const a=(s=this.getStageObjByKey(e))==null?void 0:s.pixiContainer;if(!a)return;const o={open:r.mouthAnimation.open,half_open:r.mouthAnimation.halfOpen,closed:r.mouthAnimation.close};this.loadAsset(o[n],()=>{var c;const u=this.assetLoader.resources[o[n]].texture,l=(c=a==null?void 0:a.children)==null?void 0:c[0];!u||!l||(l.texture=u)})}performBlinkAnimation(e,r,n,i){var s;const a=(s=this.getStageObjByKey(e))==null?void 0:s.pixiContainer;if(!a)return;const o={open:r.blinkAnimation.open,closed:r.blinkAnimation.close};this.loadAsset(o[n],()=>{var c;const u=this.assetLoader.resources[o[n]].texture,l=(c=a==null?void 0:a.children)==null?void 0:c[0];!u||!l||(l.texture=u)})}addBg(e,r){var l,c;const n=this.assetLoader,i=new Hh;this.backgroundObjects.findIndex(f=>f.key===e)>=0&&this.removeStageObjectByKey(e),this.backgroundContainer.addChild(i);const s=Hs();this.backgroundObjects.push({uuid:s,key:e,pixiContainer:i,sourceUrl:r,sourceType:"img",sourceExt:this.getExtName(r)});const u=()=>{setTimeout(()=>{var h,d;const f=(d=(h=n.resources)==null?void 0:h[r])==null?void 0:d.texture;if(f&&this.getStageObjByUuid(s)){const p=f.width,v=f.height,g=this.stageWidth/p,m=this.stageHeight/v,y=Math.max(g,m),_=new _i(f);_.scale.x=y,_.scale.y=y,_.anchor.set(.5),_.position.y=this.stageHeight/2,i.setBaseX(this.stageWidth/2),i.setBaseY(this.stageHeight/2),i.pivot.set(0,this.stageHeight/2),i.addChild(_)}},0)};this.cacheGC(),(c=(l=n.resources)==null?void 0:l[r])!=null&&c.texture?u():this.loadAsset(r,u)}addSpineBg(e,r){var c;const n=`spine-${r}`,i=this.assetLoader,a=new Hh;this.backgroundObjects.findIndex(f=>f.key===e)>=0&&this.removeStageObjectByKey(e),this.backgroundContainer.addChild(a);const u=Hs();this.backgroundObjects.push({uuid:u,key:e,pixiContainer:a,sourceUrl:r,sourceType:"live2d",sourceExt:this.getExtName(r)});const l=()=>{var h;const f=(h=this.assetLoader.resources)==null?void 0:h[n];setTimeout(()=>{var d;if(f&&this.getStageObjByUuid(u)){const p=new bO(f.spineData);(d=f==null?void 0:f.spineData)==null||d.y;const v=p.width,g=p.height,m=this.stageWidth/v,y=this.stageHeight/g;ge.debug("bgSpine state",p.state),p.spineData.animations.length>0&&p.state.setAnimation(0,p.spineData.animations[0].name,!0);const _=Math.max(m,y),x=new _i;x.addChild(p),x.scale.x=_,x.scale.y=_,x.anchor.set(.5),x.position.y=this.stageHeight/2,a.setBaseX(this.stageWidth/2),a.setBaseY(this.stageHeight/2),a.pivot.set(0,this.stageHeight/2),a.addChild(x)}},0)};this.cacheGC(),(c=i.resources)!=null&&c[r]?l():this.loadAsset(r,l,n)}addFigure(e,r,n="center"){var f,h;const i=this.assetLoader,a=new Hh;this.figureObjects.findIndex(d=>d.key===e)>=0&&this.removeStageObjectByKey(e);const u=this.getFigureMetadataByKey(e);u&&u.zIndex&&(a.zIndex=u.zIndex),this.figureContainer.addChild(a);const l=Hs();this.figureObjects.push({uuid:l,key:e,pixiContainer:a,sourceUrl:r,sourceType:"img",sourceExt:this.getExtName(r)});const c=()=>{setTimeout(()=>{var p,v;const d=(v=(p=i.resources)==null?void 0:p[r])==null?void 0:v.texture;if(d&&this.getStageObjByUuid(l)){const g=d.width,m=d.height,y=this.stageWidth/g,_=this.stageHeight/m,x=Math.min(y,_),b=new _i(d);b.scale.x=x,b.scale.y=x,b.anchor.set(.5),b.position.y=this.stageHeight/2;const S=g*x,w=m*x;a.setBaseY(this.stageHeight/2),wd.key===e)>=0&&this.removeStageObjectByKey(e);const l=this.getFigureMetadataByKey(e);l&&l.zIndex&&(o.zIndex=l.zIndex),this.figureContainer.addChild(o);const c=Hs();this.figureObjects.push({uuid:c,key:e,pixiContainer:o,sourceUrl:r,sourceType:"live2d",sourceExt:this.getExtName(r)});const f=()=>{var p;const d=(p=this.assetLoader.resources)==null?void 0:p[i];setTimeout(()=>{var v;if(d&&this.getStageObjByUuid(c)){const g=new bO(d.spineData),m=((v=d==null?void 0:d.spineData)==null?void 0:v.y)??0,y=g.width,_=g.height,x=this.stageWidth/y,b=this.stageHeight/_;g.y=-(b*m)/2,g.state.setAnimation(0,"07",!0);const S=Math.min(x,b),w=new _i;w.addChild(g),w.scale.x=S,w.scale.y=S,w.anchor.set(.5),w.position.y=this.stageHeight/2;const E=y*S,T=_*S;o.setBaseY(this.stageHeight/2),Ts.key===e);if((n==null?void 0:n.sourceType)!=="live2d")return;const i=this.live2dFigureRecorder.find(s=>s.target===e);if(n&&(i==null?void 0:i.motion)!==r){const u=n.pixiContainer.children;for(const l of u){let c=r,f=0,h=3;const d=(l==null?void 0:l.internalModel)??void 0;(o=(a=d==null?void 0:d.motionManager)==null?void 0:a.stopAllMotions)==null||o.call(a),l.motion(c,f,h)}this.updateL2dMotionByKey(e,r)}}changeModelExpressionByKey(e,r){const n=this.figureObjects.find(a=>a.key===e);if((n==null?void 0:n.sourceType)!=="live2d")return;const i=this.live2dFigureRecorder.find(a=>a.target===e);if(n&&(i==null?void 0:i.expression)!==r){const o=n.pixiContainer.children;for(const s of o)s.expression(r);this.updateL2dExpressionByKey(e,r)}}setModelMouthY(e,r){var o,s,u,l,c,f,h,d,p;function n(v){return v<50?0:(v-50)/50}const i=n(r),a=this.figureObjects.find(v=>v.key===e);if(a){const g=a.pixiContainer.children;for(const m of g)m!=null&&m.internalModel&&((s=(o=m==null?void 0:m.internalModel)==null?void 0:o.coreModel)!=null&&s.setParamFloat&&((c=(l=(u=m==null?void 0:m.internalModel)==null?void 0:u.coreModel)==null?void 0:l.setParamFloat)==null||c.call(l,"PARAM_MOUTH_OPEN_Y",i)),(h=(f=m==null?void 0:m.internalModel)==null?void 0:f.coreModel)!=null&&h.setParameterValueById&&((p=(d=m==null?void 0:m.internalModel)==null?void 0:d.coreModel)==null||p.setParameterValueById("ParamMouthOpenY",i)))}}getStageObjByKey(e){return[...this.figureObjects,...this.backgroundObjects].find(r=>r.key===e)}getStageObjByUuid(e){return[...this.figureObjects,...this.backgroundObjects].find(r=>r.uuid===e)}getAllStageObj(){return[...this.figureObjects,...this.backgroundObjects]}removeStageObjectByKey(e){const r=this.figureObjects.findIndex(i=>i.key===e),n=this.backgroundObjects.findIndex(i=>i.key===e);if(r>=0){const i=this.figureObjects[r];for(const a of i.pixiContainer.children)a.destroy();i.pixiContainer.destroy(),this.figureContainer.removeChild(i.pixiContainer),this.figureObjects.splice(r,1)}if(n>=0){const i=this.backgroundObjects[n];for(const a of i.pixiContainer.children)a.destroy();i.pixiContainer.destroy(),this.backgroundContainer.removeChild(i.pixiContainer),this.backgroundObjects.splice(n,1)}}cacheGC(){fL()}updateL2dMotionByKey(e,r){const n=this.live2dFigureRecorder.findIndex(i=>i.target===e);n>=0?this.live2dFigureRecorder[n].motion=r:this.live2dFigureRecorder.push({target:e,motion:r,expression:""})}updateL2dExpressionByKey(e,r){const n=this.live2dFigureRecorder.findIndex(i=>i.target===e);n>=0?this.live2dFigureRecorder[n].expression=r:this.live2dFigureRecorder.push({target:e,motion:"",expression:r})}loadAsset(e,r,n){this.loadQueue.unshift({url:e,callback:r,name:n}),this.callLoader()}callLoader(){if(!this.assetLoader.loading){const e=this.loadQueue.shift();if(e)try{this.assetLoader.resources[e.url]?(e.callback(),this.callLoader()):e.name?this.assetLoader.add(e.name,e.url).load(()=>{e.callback(),this.callLoader()}):this.assetLoader.add(e.url).load(()=>{e.callback(),this.callLoader()})}catch(r){ge.fatal("PIXI Loader 故障",r),e.callback(),this.callLoader()}}}updateFps(){zy==null||zy(120).then(e=>{this.frameDuration=1e3/e})}lockStageObject(e){this.lockTransformTarget.push(e)}unlockStageObject(e){const r=this.lockTransformTarget.findIndex(n=>n===e);r>=0&&this.lockTransformTarget.splice(r,1)}getExtName(e){return e.split(".").pop()??"png"}getFigureMetadataByKey(e){return console.log(e,te.getState().stage.figureMetaData),te.getState().stage.figureMetaData[e]}}const zy=(()=>{const t=[window.requestAnimationFrame,window.webkitRequestAnimationFrame,window.mozRequestAnimationFrame].find(e=>e);if(!t){console.error("requestAnimationFrame is not supported!");return}return(e=60)=>{if(e<1)throw new Error("targetCount cannot be less than 1.");const r=Date.now();let n=0;return new Promise(i=>{(function a(){t(()=>{if(++n>=e){const o=Date.now()-r,s=n/o*1e3;return i(s)}a()})})()})}})(),Q3={version:"WebGAL 4.5.8",contributors:[]},F_e=navigator.userAgent,ME=!!F_e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),N_e=()=>{ge.info(Q3.version),ge.info("Github: https://github.com/OpenWebGAL/WebGAL "),ge.info("Made with ❤ by OpenWebGAL"),ME&&alert(`iOS 用户请横屏使用以获得最佳体验 +***************************************************************************** */var p1=function(t,e){return p1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},p1(t,e)};function Q3(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");p1(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var or;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.VER37=37]="VER37",t[t.VER38=38]="VER38",t[t.VER40=40]="VER40",t[t.VER41=41]="VER41"})(or||(or={}));function Fp(t){var e=t.substr(0,3),r=Math.floor(+e*10+.001);return e==="3.7"?or.VER37:e==="3.8"?or.VER38:e==="4.0"?or.VER40:e==="4.1"?or.VER41:r{this.updateFps(),setTimeout(i,1e4)};i();const a=()=>{setTimeout(a,500),this.callLoader()};a()}getFigureObjects(){return this.figureObjects}getAllLockedObject(){return this.lockTransformTarget}registerAnimation(e,r,n="default"){var i;e&&(this.stageAnimations.push({uuid:Hs(),animationObject:e,key:r,targetKey:n,type:"common"}),this.lockStageObject(n),e.setStartState(),(i=this.currentApp)==null||i.ticker.add(e.tickerFunc))}registerPresetAnimation(e,r,n="default",i){var o;if(!e)return;const a=i.find(s=>s.target===n);if(a){const s=this.getStageObjByKey(n);if(s){const u=s.pixiContainer;Object.assign(u,a.transform)}return}this.stageAnimations.push({uuid:Hs(),animationObject:e,key:r,targetKey:n,type:"preset"}),this.lockStageObject(n),e.setStartState(),(o=this.currentApp)==null||o.ticker.add(e.tickerFunc)}stopPresetAnimationOnTarget(e){const r=this.stageAnimations.find(n=>n.targetKey===e&&n.type==="preset");r&&this.removeAnimation(r.key)}removeAnimation(e){var n;const r=this.stageAnimations.findIndex(i=>i.key===e);if(r>=0){const i=this.stageAnimations[r];(n=this.currentApp)==null||n.ticker.remove(i.animationObject.tickerFunc),i.animationObject.setEndState(),this.unlockStageObject(i.targetKey??"default"),this.stageAnimations.splice(r,1)}}removeAnimationWithSetEffects(e){var n,i,a;const r=this.stageAnimations.findIndex(o=>o.key===e);if(r>=0){const o=this.stageAnimations[r];(n=this.currentApp)==null||n.ticker.remove(o.animationObject.tickerFunc),o.animationObject.setEndState();const s=((a=(i=o.animationObject).getEndFilterEffect)==null?void 0:a.call(i))??{};if(this.unlockStageObject(o.targetKey??"default"),o.targetKey){const u=this.getStageObjByKey(o.targetKey);if(u){const l={alpha:u.pixiContainer.alphaFilterVal,scale:{x:u.pixiContainer.scale.x,y:u.pixiContainer.scale.y},position:{x:u.pixiContainer.x,y:u.pixiContainer.y},rotation:u.pixiContainer.rotation,blur:u.pixiContainer.blur,...s};let c={target:o.targetKey,transform:l};te.dispatch(hr.updateEffect(c))}}this.stageAnimations.splice(r,1)}}performMouthSyncAnimation(e,r,n,i){var s;const a=(s=this.getStageObjByKey(e))==null?void 0:s.pixiContainer;if(!a)return;const o={open:r.mouthAnimation.open,half_open:r.mouthAnimation.halfOpen,closed:r.mouthAnimation.close};this.loadAsset(o[n],()=>{var c;const u=this.assetLoader.resources[o[n]].texture,l=(c=a==null?void 0:a.children)==null?void 0:c[0];!u||!l||(l.texture=u)})}performBlinkAnimation(e,r,n,i){var s;const a=(s=this.getStageObjByKey(e))==null?void 0:s.pixiContainer;if(!a)return;const o={open:r.blinkAnimation.open,closed:r.blinkAnimation.close};this.loadAsset(o[n],()=>{var c;const u=this.assetLoader.resources[o[n]].texture,l=(c=a==null?void 0:a.children)==null?void 0:c[0];!u||!l||(l.texture=u)})}addBg(e,r){var l,c;const n=this.assetLoader,i=new Hh;this.backgroundObjects.findIndex(f=>f.key===e)>=0&&this.removeStageObjectByKey(e),this.backgroundContainer.addChild(i);const s=Hs();this.backgroundObjects.push({uuid:s,key:e,pixiContainer:i,sourceUrl:r,sourceType:"img",sourceExt:this.getExtName(r)});const u=()=>{setTimeout(()=>{var h,d;const f=(d=(h=n.resources)==null?void 0:h[r])==null?void 0:d.texture;if(f&&this.getStageObjByUuid(s)){const p=f.width,v=f.height,g=this.stageWidth/p,m=this.stageHeight/v,y=Math.max(g,m),_=new _i(f);_.scale.x=y,_.scale.y=y,_.anchor.set(.5),_.position.y=this.stageHeight/2,i.setBaseX(this.stageWidth/2),i.setBaseY(this.stageHeight/2),i.pivot.set(0,this.stageHeight/2),i.addChild(_)}},0)};this.cacheGC(),(c=(l=n.resources)==null?void 0:l[r])!=null&&c.texture?u():this.loadAsset(r,u)}addSpineBg(e,r){var c;const n=`spine-${r}`,i=this.assetLoader,a=new Hh;this.backgroundObjects.findIndex(f=>f.key===e)>=0&&this.removeStageObjectByKey(e),this.backgroundContainer.addChild(a);const u=Hs();this.backgroundObjects.push({uuid:u,key:e,pixiContainer:a,sourceUrl:r,sourceType:"live2d",sourceExt:this.getExtName(r)});const l=()=>{var h;const f=(h=this.assetLoader.resources)==null?void 0:h[n];setTimeout(()=>{var d;if(f&&this.getStageObjByUuid(u)){const p=new SO(f.spineData);(d=f==null?void 0:f.spineData)==null||d.y;const v=p.width,g=p.height,m=this.stageWidth/v,y=this.stageHeight/g;ge.debug("bgSpine state",p.state),p.spineData.animations.length>0&&p.state.setAnimation(0,p.spineData.animations[0].name,!0);const _=Math.max(m,y),x=new _i;x.addChild(p),x.scale.x=_,x.scale.y=_,x.anchor.set(.5),x.position.y=this.stageHeight/2,a.setBaseX(this.stageWidth/2),a.setBaseY(this.stageHeight/2),a.pivot.set(0,this.stageHeight/2),a.addChild(x)}},0)};this.cacheGC(),(c=i.resources)!=null&&c[r]?l():this.loadAsset(r,l,n)}addFigure(e,r,n="center"){var f,h;const i=this.assetLoader,a=new Hh;this.figureObjects.findIndex(d=>d.key===e)>=0&&this.removeStageObjectByKey(e);const u=this.getFigureMetadataByKey(e);u&&u.zIndex&&(a.zIndex=u.zIndex),this.figureContainer.addChild(a);const l=Hs();this.figureObjects.push({uuid:l,key:e,pixiContainer:a,sourceUrl:r,sourceType:"img",sourceExt:this.getExtName(r)});const c=()=>{setTimeout(()=>{var p,v;const d=(v=(p=i.resources)==null?void 0:p[r])==null?void 0:v.texture;if(d&&this.getStageObjByUuid(l)){const g=d.width,m=d.height,y=this.stageWidth/g,_=this.stageHeight/m,x=Math.min(y,_),b=new _i(d);b.scale.x=x,b.scale.y=x,b.anchor.set(.5),b.position.y=this.stageHeight/2;const S=g*x,w=m*x;a.setBaseY(this.stageHeight/2),wd.key===e)>=0&&this.removeStageObjectByKey(e);const l=this.getFigureMetadataByKey(e);l&&l.zIndex&&(o.zIndex=l.zIndex),this.figureContainer.addChild(o);const c=Hs();this.figureObjects.push({uuid:c,key:e,pixiContainer:o,sourceUrl:r,sourceType:"live2d",sourceExt:this.getExtName(r)});const f=()=>{var p;const d=(p=this.assetLoader.resources)==null?void 0:p[i];setTimeout(()=>{var v;if(d&&this.getStageObjByUuid(c)){const g=new SO(d.spineData),m=((v=d==null?void 0:d.spineData)==null?void 0:v.y)??0,y=g.width,_=g.height,x=this.stageWidth/y,b=this.stageHeight/_;g.y=-(b*m)/2,g.state.setAnimation(0,"07",!0);const S=Math.min(x,b),w=new _i;w.addChild(g),w.scale.x=S,w.scale.y=S,w.anchor.set(.5),w.position.y=this.stageHeight/2;const E=y*S,T=_*S;o.setBaseY(this.stageHeight/2),Ts.key===e);if((n==null?void 0:n.sourceType)!=="live2d")return;const i=this.live2dFigureRecorder.find(s=>s.target===e);if(n&&(i==null?void 0:i.motion)!==r){const u=n.pixiContainer.children;for(const l of u){let c=r,f=0,h=3;const d=(l==null?void 0:l.internalModel)??void 0;(o=(a=d==null?void 0:d.motionManager)==null?void 0:a.stopAllMotions)==null||o.call(a),l.motion(c,f,h)}this.updateL2dMotionByKey(e,r)}}changeModelExpressionByKey(e,r){const n=this.figureObjects.find(a=>a.key===e);if((n==null?void 0:n.sourceType)!=="live2d")return;const i=this.live2dFigureRecorder.find(a=>a.target===e);if(n&&(i==null?void 0:i.expression)!==r){const o=n.pixiContainer.children;for(const s of o)s.expression(r);this.updateL2dExpressionByKey(e,r)}}setModelMouthY(e,r){var o,s,u,l,c,f,h,d,p;function n(v){return v<50?0:(v-50)/50}const i=n(r),a=this.figureObjects.find(v=>v.key===e);if(a&&a.sourceType==="live2d"){const g=a.pixiContainer.children;for(const m of g)m!=null&&m.internalModel&&((s=(o=m==null?void 0:m.internalModel)==null?void 0:o.coreModel)!=null&&s.setParamFloat&&((c=(l=(u=m==null?void 0:m.internalModel)==null?void 0:u.coreModel)==null?void 0:l.setParamFloat)==null||c.call(l,"PARAM_MOUTH_OPEN_Y",i)),(h=(f=m==null?void 0:m.internalModel)==null?void 0:f.coreModel)!=null&&h.setParameterValueById&&((p=(d=m==null?void 0:m.internalModel)==null?void 0:d.coreModel)==null||p.setParameterValueById("ParamMouthOpenY",i)))}}getStageObjByKey(e){return[...this.figureObjects,...this.backgroundObjects].find(r=>r.key===e)}getStageObjByUuid(e){return[...this.figureObjects,...this.backgroundObjects].find(r=>r.uuid===e)}getAllStageObj(){return[...this.figureObjects,...this.backgroundObjects]}removeStageObjectByKey(e){const r=this.figureObjects.findIndex(i=>i.key===e),n=this.backgroundObjects.findIndex(i=>i.key===e);if(r>=0){const i=this.figureObjects[r];for(const a of i.pixiContainer.children)a.destroy();i.pixiContainer.destroy(),this.figureContainer.removeChild(i.pixiContainer),this.figureObjects.splice(r,1)}if(n>=0){const i=this.backgroundObjects[n];for(const a of i.pixiContainer.children)a.destroy();i.pixiContainer.destroy(),this.backgroundContainer.removeChild(i.pixiContainer),this.backgroundObjects.splice(n,1)}}cacheGC(){hL()}updateL2dMotionByKey(e,r){const n=this.live2dFigureRecorder.findIndex(i=>i.target===e);n>=0?this.live2dFigureRecorder[n].motion=r:this.live2dFigureRecorder.push({target:e,motion:r,expression:""})}updateL2dExpressionByKey(e,r){const n=this.live2dFigureRecorder.findIndex(i=>i.target===e);n>=0?this.live2dFigureRecorder[n].expression=r:this.live2dFigureRecorder.push({target:e,motion:"",expression:r})}loadAsset(e,r,n){this.loadQueue.unshift({url:e,callback:r,name:n}),this.callLoader()}callLoader(){if(!this.assetLoader.loading){const e=this.loadQueue.shift();if(e)try{this.assetLoader.resources[e.url]?(e.callback(),this.callLoader()):e.name?this.assetLoader.add(e.name,e.url).load(()=>{e.callback(),this.callLoader()}):this.assetLoader.add(e.url).load(()=>{e.callback(),this.callLoader()})}catch(r){ge.fatal("PIXI Loader 故障",r),e.callback(),this.callLoader()}}}updateFps(){zy==null||zy(120).then(e=>{this.frameDuration=1e3/e})}lockStageObject(e){this.lockTransformTarget.push(e)}unlockStageObject(e){const r=this.lockTransformTarget.findIndex(n=>n===e);r>=0&&this.lockTransformTarget.splice(r,1)}getExtName(e){return e.split(".").pop()??"png"}getFigureMetadataByKey(e){return console.log(e,te.getState().stage.figureMetaData),te.getState().stage.figureMetaData[e]}}const zy=(()=>{const t=[window.requestAnimationFrame,window.webkitRequestAnimationFrame,window.mozRequestAnimationFrame].find(e=>e);if(!t){console.error("requestAnimationFrame is not supported!");return}return(e=60)=>{if(e<1)throw new Error("targetCount cannot be less than 1.");const r=Date.now();let n=0;return new Promise(i=>{(function a(){t(()=>{if(++n>=e){const o=Date.now()-r,s=n/o*1e3;return i(s)}a()})})()})}})(),J3={version:"WebGAL 4.5.9",contributors:[]},N_e=navigator.userAgent,FE=!!N_e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),L_e=()=>{ge.info(J3.version),ge.info("Github: https://github.com/OpenWebGAL/WebGAL "),ge.info("Made with ❤ by OpenWebGAL"),FE&&alert(`iOS 用户请横屏使用以获得最佳体验 | Please use landscape mode on iOS for the best experience -| iOS ユーザーは横画面での使用をお勧めします`),L_e("./game/userStyleSheet.css"),D_e(),lle("./game/config.txt");const t=Nn("start.txt",Fn.scene);ua(t).then(e=>{L.sceneManager.sceneData.currentScene=ca(e,"start.txt",t);const r=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(t);const n=jf(r);Uf(n)}),L.gameplay.pixiStage=new M_e,hle(),dle()};function L_e(t){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)}function D_e(){Wc.get("./game/animation/animationTable.json").then(t=>{const e=t.data;for(const r of e)Wc.get(`./game/animation/${r}.json`).then(n=>{if(n.data){const i={name:r,effects:n.data};L.animationManager.addAnimation(i)}})})}const B_e="_Menu_main_1a7i6_1",j_e="_Menu_ShowSoftly_1a7i6_1",U_e="_Menu_TagContent_1a7i6_10",SO={Menu_main:B_e,Menu_ShowSoftly:j_e,Menu_TagContent:U_e},$_e="_MenuPanel_main_1c9ky_1",V_e="_MenuPanel_button_1c9ky_10",G_e="_MenuPanel_button_icon_1c9ky_38",X_e="_MenuPanel_button_hl_1c9ky_44",fl={MenuPanel_main:$_e,MenuPanel_button:V_e,MenuPanel_button_icon:G_e,MenuPanel_button_hl:X_e};var z_e=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function wO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function EO(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function H_e(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a=0)&&(r[i]=t[i]);return r}var q_e={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};function K_e(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function Z_e(t,e,r){var n=typeof e.fill=="string"?[e.fill]:e.fill||[],i=[],a=e.theme||r.theme;switch(a){case"outline":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.multiColor.outFillColor),i.push(typeof n[2]=="string"?n[2]:r.colors.multiColor.innerStrokeColor),i.push(typeof n[3]=="string"?n[3]:r.colors.multiColor.innerFillColor);break}return{size:e.size||r.size,strokeWidth:e.strokeWidth||r.strokeWidth,strokeLinecap:e.strokeLinecap||r.strokeLinecap,strokeLinejoin:e.strokeLinejoin||r.strokeLinejoin,colors:i,id:t}}var J3=ne.createContext(q_e);J3.Provider;function Lt(t,e,r){return function(n){var i=n.size,a=n.strokeWidth,o=n.strokeLinecap,s=n.strokeLinejoin,u=n.theme,l=n.fill,c=n.className,f=n.spin,h=Y_e(n,z_e),d=ne.useContext(J3),p=ne.useMemo(K_e,[]),v=Z_e(p,{size:i,strokeWidth:a,strokeLinecap:o,strokeLinejoin:s,theme:u,fill:l},d),g=[d.prefix+"-icon"];return g.push(d.prefix+"-icon-"+t),e&&d.rtl&&g.push(d.prefix+"-icon-rtl"),f&&g.push(d.prefix+"-icon-spin"),c&&g.push(c),fe.createElement("span",EO(EO({},h),{},{className:g.join(" ")}),r(v))}}const Q_e=Lt("align-text-left-one",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M39 6H9C7.34315 6 6 7.34315 6 9V39C6 40.6569 7.34315 42 9 42H39C40.6569 42 42 40.6569 42 39V9C42 7.34315 40.6569 6 39 6Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M26 24H14",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M34 15H14",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M32 33H14",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),eB=Lt("close-small",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M14 14L34 34",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 34L34 14",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),J_e=Lt("double-down",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M36 12L24 24L12 12",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M36 24L24 36L12 24",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),exe=Lt("double-right",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M12 12L24 24L12 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 12L36 24L24 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),txe=Lt("double-up",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M12 24L24 12L36 24",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M12 36L24 24L36 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),tB=Lt("folder-open",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M4 9V41L9 21H39.5V15C39.5 13.8954 38.6046 13 37.5 13H24L19 7H6C4.89543 7 4 7.89543 4 9Z",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M40 41L44 21H8.8125L4 41H40Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),rxe=Lt("go-end",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M14 12L26 24L14 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M34 12V36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),nxe=Lt("go-start",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M34 36L22 24L34 12",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 12V36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),ixe=Lt("hamburger-button",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M7.94971 11.9497H39.9497",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M7.94971 23.9497H39.9497",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M7.94971 35.9497H39.9497",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),rB=Lt("home",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M9 18V42H39V18L24 6L9 18Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M19 29V42H29V29H19Z",fill:t.colors[3],stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M9 42H39",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap}))}),axe=Lt("left",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M31 36L19 24L31 12",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),oxe=Lt("lock",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("rect",{x:"6",y:"22",width:"36",height:"22",rx:"2",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 22V14C14 8.47715 18.4772 4 24 4C29.5228 4 34 8.47715 34 14V22",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 30V36",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),sxe=Lt("logout",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M23.9917 6H6V42H24",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M33 33L42 24L33 15",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M16 23.9917H42",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),lxe=Lt("music-list",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M24 19H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 10H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M8 38H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M8 28H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M8 10L16 15L8 20V10Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),nB=Lt("play-one",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M15 24V11.8756L25.5 17.9378L36 24L25.5 30.0622L15 36.1244V24Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),uxe=Lt("preview-close-one",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M9.85786 18C6.23858 21 4 24 4 24C4 24 12.9543 36 24 36C25.3699 36 26.7076 35.8154 28 35.4921M20.0318 12.5C21.3144 12.1816 22.6414 12 24 12C35.0457 12 44 24 44 24C44 24 41.7614 27 38.1421 30",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M20.3142 20.6211C19.4981 21.5109 19 22.6972 19 23.9998C19 26.7612 21.2386 28.9998 24 28.9998C25.3627 28.9998 26.5981 28.4546 27.5 27.5705",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M42 42L6 6",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),cxe=Lt("preview-open",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M24 36C35.0457 36 44 24 44 24C44 24 35.0457 12 24 12C12.9543 12 4 24 4 24C4 24 12.9543 36 24 36Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 29C26.7614 29 29 26.7614 29 24C29 21.2386 26.7614 19 24 19C21.2386 19 19 21.2386 19 24C19 26.7614 21.2386 29 24 29Z",fill:t.colors[3],stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),fxe=Lt("replay-music",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M21 24V18L26 21L31 24L26 27L21 30V24Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M11.2721 36.7279C14.5294 39.9853 19.0294 42 24 42C33.9411 42 42 33.9411 42 24C42 14.0589 33.9411 6 24 6C19.0294 6 14.5294 8.01472 11.2721 11.2721C9.6141 12.9301 6 17 6 17",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M6 9V17H14",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),hxe=Lt("return",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M12.9998 8L6 14L12.9998 21",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M6 14H28.9938C35.8768 14 41.7221 19.6204 41.9904 26.5C42.2739 33.7696 36.2671 40 28.9938 40H11.9984",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),iB=Lt("save",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M6 9C6 7.34315 7.34315 6 9 6H34.2814L42 13.2065V39C42 40.6569 40.6569 42 39 42H9C7.34315 42 6 40.6569 6 39V9Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.0083 6L24 13.3846C24 13.7245 23.5523 14 23 14H15C14.4477 14 14 13.7245 14 13.3846L14 6",fill:t.colors[3]}),fe.createElement("path",{d:"M24.0083 6L24 13.3846C24 13.7245 23.5523 14 23 14H15C14.4477 14 14 13.7245 14 13.3846L14 6H24.0083Z",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M9 6H34.2814",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 26H34",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 34H24.0083",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),aB=Lt("setting-two",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M18.2838 43.1713C14.9327 42.1736 11.9498 40.3213 9.58787 37.867C10.469 36.8227 11 35.4734 11 34.0001C11 30.6864 8.31371 28.0001 5 28.0001C4.79955 28.0001 4.60139 28.01 4.40599 28.0292C4.13979 26.7277 4 25.3803 4 24.0001C4 21.9095 4.32077 19.8938 4.91579 17.9995C4.94381 17.9999 4.97188 18.0001 5 18.0001C8.31371 18.0001 11 15.3138 11 12.0001C11 11.0488 10.7786 10.1493 10.3846 9.35011C12.6975 7.1995 15.5205 5.59002 18.6521 4.72314C19.6444 6.66819 21.6667 8.00013 24 8.00013C26.3333 8.00013 28.3556 6.66819 29.3479 4.72314C32.4795 5.59002 35.3025 7.1995 37.6154 9.35011C37.2214 10.1493 37 11.0488 37 12.0001C37 15.3138 39.6863 18.0001 43 18.0001C43.0281 18.0001 43.0562 17.9999 43.0842 17.9995C43.6792 19.8938 44 21.9095 44 24.0001C44 25.3803 43.8602 26.7277 43.594 28.0292C43.3986 28.01 43.2005 28.0001 43 28.0001C39.6863 28.0001 37 30.6864 37 34.0001C37 35.4734 37.531 36.8227 38.4121 37.867C36.0502 40.3213 33.0673 42.1736 29.7162 43.1713C28.9428 40.752 26.676 39.0001 24 39.0001C21.324 39.0001 19.0572 40.752 18.2838 43.1713Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 31C27.866 31 31 27.866 31 24C31 20.134 27.866 17 24 17C20.134 17 17 20.134 17 24C17 27.866 20.134 31 24 31Z",fill:t.colors[3],stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),dxe=Lt("square-small",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M34 12H14C12.8954 12 12 12.8954 12 14V34C12 35.1046 12.8954 36 14 36H34C35.1046 36 36 35.1046 36 34V14C36 12.8954 35.1046 12 34 12Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth}))}),pxe=Lt("unlock",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("rect",{x:"7",y:"22.0476",width:"34",height:"22",rx:"2",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 22V14.0047C13.9948 8.87022 17.9227 4.56718 23.0859 4.05117C28.249 3.53516 32.9673 6.97408 34 12.0059",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 30V36",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),vxe=Lt("volume-notice",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M24 6V42C17 42 11.7985 32.8391 11.7985 32.8391H6C4.89543 32.8391 4 31.9437 4 30.8391V17.0108C4 15.9062 4.89543 15.0108 6 15.0108H11.7985C11.7985 15.0108 17 6 24 6Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M32 15L32 15C32.6232 15.5565 33.1881 16.1797 33.6841 16.8588C35.1387 18.8504 36 21.3223 36 24C36 26.6545 35.1535 29.1067 33.7218 31.0893C33.2168 31.7885 32.6391 32.4293 32 33",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M34.2359 41.1857C40.0836 37.6953 44 31.305 44 24C44 16.8085 40.2043 10.5035 34.507 6.97906",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap}))}),mxe=t=>{let e;switch(t.iconName){case"save":e=C.jsx(iB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"load":e=C.jsx(tB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"option":e=C.jsx(aB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"title":e=C.jsx(rB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"exit":e=C.jsx(sxe,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;default:e=C.jsx("div",{})}return e},qu=t=>{const{playSePageChange:e,playSeEnter:r}=_n();let n=fl.MenuPanel_button;return t.hasOwnProperty("buttonOnClassName")&&(n=n+t.buttonOnClassName),C.jsxs("div",{className:n,onClick:()=>{t.clickFunc()},onMouseEnter:r,style:{...t.style,color:t.tagColor},children:[C.jsx("div",{className:fl.MenuPanel_button_icon,children:C.jsx(mxe,{iconName:t.iconName,iconColor:t.iconColor})}),t.tagName]})},FE=()=>{const t=te.dispatch;CS(),kS(),Tl(),t(Ge({key:"playVocal",value:""})),t(rt({component:"showTitle",visibility:!0})),Wf(te.getState().GUI.titleBg)},gxe="_GlobalDialog_main_101j8_2",yxe="_showGlobalDialog_101j8_1",_xe="_glabalDialog_container_inner_101j8_17",xxe="_glabalDialog_container_101j8_17",bxe="_title_101j8_36",Sxe="_button_list_101j8_41",wxe="_button_101j8_41",Uo={GlobalDialog_main:gxe,showGlobalDialog:yxe,glabalDialog_container_inner:_xe,glabalDialog_container:xxe,title:bxe,button_list:Sxe,button:wxe};function Exe(){const t=Ne(e=>e.GUI.showGlobalDialog);return C.jsx(C.Fragment,{children:t&&C.jsx("div",{id:"globalDialogContainer"})})}function as(t){const{playSeClick:e,playSeEnter:r}=uS();te.dispatch(rt({component:"showGlobalDialog",visibility:!0}));const n=()=>{e(),t.leftFunc(),TO()},i=()=>{e(),t.rightFunc(),TO()},a=C.jsx("div",{className:Uo.GlobalDialog_main,children:C.jsx("div",{className:Uo.glabalDialog_container,children:C.jsxs("div",{className:Uo.glabalDialog_container_inner,children:[C.jsx("div",{className:Uo.title,children:t.title}),C.jsxs("div",{className:Uo.button_list,children:[C.jsx("div",{className:Uo.button,onClick:n,onMouseEnter:r,children:t.leftText}),C.jsx("div",{className:Uo.button,onClick:i,onMouseEnter:r,children:t.rightText})]})]})})});setTimeout(()=>{ea.render(a,document.getElementById("globalDialogContainer"))},100)}function TO(){te.dispatch(rt({component:"showGlobalDialog",visibility:!1}))}function Txe(){te.dispatch(rt({component:"showControls",visibility:!0}))}function Axe(){te.dispatch(rt({component:"showControls",visibility:!1}))}function Cxe(){te.getState().GUI.showControls===!0?Axe():Txe()}const Pxe=()=>{const t=On("menu."),{playSeClick:e,playSeDialogOpen:r,playSePageChange:n}=_n(),i=Ne(v=>v.GUI),a=Lr(),o=i.currentMenuTag===vt.Save?` ${fl.MenuPanel_button_hl}`:"",s=i.currentMenuTag===vt.Load?` ${fl.MenuPanel_button_hl}`:"",u=i.currentMenuTag===vt.Option?` ${fl.MenuPanel_button_hl}`:"",l=i.currentMenuTag===vt.Save?"rgba(74, 34, 93, 0.9)":"rgba(123,144,169,1)",c=i.currentMenuTag===vt.Load?"rgba(11, 52, 110, 0.9)":"rgba(123,144,169,1)",f=i.currentMenuTag===vt.Option?"rgba(81, 110, 65, 0.9)":"rgba(123,144,169,1)",h=i.currentMenuTag===vt.Save?"rgba(74, 34, 93, 0.9)":"rgba(123,144,169,1)",d=i.currentMenuTag===vt.Load?"rgba(11, 52, 110, 0.9)":"rgba(123,144,169,1)",p=i.currentMenuTag===vt.Option?"rgba(81, 110, 65, 0.9)":"rgba(123,144,169,1)";return C.jsxs("div",{className:fl.MenuPanel_main,children:[C.jsx(qu,{iconName:"save",buttonOnClassName:o,iconColor:h,tagColor:l,clickFunc:()=>{n(),!i.showTitle&&a(ss(vt.Save))},tagName:t("saving.title")},"saveButton"),C.jsx(qu,{iconName:"load",buttonOnClassName:s,iconColor:d,tagColor:c,clickFunc:()=>{n(),a(ss(vt.Load))},tagName:t("loadSaving.title")},"loadButton"),C.jsx(qu,{iconName:"title",iconColor:"rgba(123,144,169,1)",tagColor:"rgba(123,144,169,1)",clickFunc:()=>{r(),as({title:t("$gaming.buttons.titleTips"),leftText:t("$common.yes"),rightText:t("$common.no"),leftFunc:()=>{FE(),a(rt({component:"showMenuPanel",visibility:!1}))},rightFunc:()=>{}})},tagName:t("title.title")},"titleIcon"),C.jsx(qu,{iconName:"option",style:{marginLeft:"auto"},buttonOnClassName:u,iconColor:p,tagColor:f,clickFunc:()=>{n(),a(ss(vt.Option))},tagName:t("options.title")},"optionButton"),C.jsx(qu,{iconName:"exit",iconColor:"rgba(123,144,169,1)",tagColor:"rgba(123,144,169,1)",clickFunc:()=>{e(),a(rt({component:"showMenuPanel",visibility:!1}))},tagName:t("exit.title")},"exitIcon")]})},Oxe="_Save_Load_main_a3o8b_2",Rxe="_Save_Load_top_a3o8b_9",Ixe="_Elements_in_a3o8b_1",kxe="_Save_Load_title_a3o8b_17",Mxe="_Save_title_text_a3o8b_35",Fxe="_Load_title_text_a3o8b_43",Nxe="_Save_Load_top_buttonList_a3o8b_51",Lxe="_Save_Load_top_button_a3o8b_51",Dxe="_Save_Load_top_button_text_a3o8b_69",Bxe="_Save_Load_top_button_on_a3o8b_80",jxe="_Load_top_button_on_a3o8b_93",Uxe="_Load_top_button_a3o8b_93",$xe="_Save_Load_content_a3o8b_106",Vxe="_Save_Load_content_element_a3o8b_115",Gxe="_Elements_in_transform_a3o8b_1",Xxe="_Save_Load_content_element_top_a3o8b_131",zxe="_Save_Load_content_element_top_index_a3o8b_138",Wxe="_Load_content_elememt_top_index_a3o8b_147",Yxe="_Save_Load_content_element_top_date_a3o8b_151",Hxe="_Load_content_element_top_date_a3o8b_162",qxe="_Save_Load_content_text_a3o8b_166",Kxe="_Save_Load_content_text_padding_a3o8b_180",Zxe="_Save_Load_content_speaker_a3o8b_184",Qxe="_Load_content_speaker_a3o8b_193",Jxe="_Load_content_text_a3o8b_197",e1e="_Save_Load_content_miniRen_a3o8b_201",t1e="_Save_Load_content_miniRen_bg_a3o8b_208",r1e="_Save_Load_content_miniRen_figure_a3o8b_215",n1e="_Save_Load_content_miniRen_figLeft_a3o8b_223",i1e="_Save_Load_content_miniRen_figRight_a3o8b_228",Ue={Save_Load_main:Oxe,Save_Load_top:Rxe,Elements_in:Ixe,Save_Load_title:kxe,Save_title_text:Mxe,Load_title_text:Fxe,Save_Load_top_buttonList:Nxe,Save_Load_top_button:Lxe,Save_Load_top_button_text:Dxe,Save_Load_top_button_on:Bxe,Load_top_button_on:jxe,Load_top_button:Uxe,Save_Load_content:$xe,Save_Load_content_element:Vxe,Elements_in_transform:Gxe,Save_Load_content_element_top:Xxe,Save_Load_content_element_top_index:zxe,Load_content_elememt_top_index:Wxe,Save_Load_content_element_top_date:Yxe,Load_content_element_top_date:Hxe,Save_Load_content_text:qxe,Save_Load_content_text_padding:Kxe,Save_Load_content_speaker:Zxe,Load_content_speaker:Qxe,Load_content_text:Jxe,Save_Load_content_miniRen:e1e,Save_Load_content_miniRen_bg:t1e,Save_Load_content_miniRen_figure:r1e,Save_Load_content_miniRen_figLeft:n1e,Save_Load_content_miniRen_figRight:i1e},a1e=()=>{const{playSePageChange:t,playSeEnter:e,playSeDialogOpen:r}=_n(),n=Ne(d=>d.userData),i=Ne(d=>d.saveData),a=Lr(),o=[];for(let d=1;d<=20;d++){let p=Ue.Save_Load_top_button;d===n.optionData.slPage&&(p=p+" "+Ue.Save_Load_top_button_on);const v=C.jsx("div",{onClick:()=>{a(Xk(d)),st(),t()},onMouseEnter:e,className:p,children:C.jsx("div",{className:Ue.Save_Load_top_button_text,children:d})},"Save_element_page"+d);o.push(v)}const s=On("common."),u=[],l=(n.optionData.slPage-1)*10+1,c=l+9;ne.useEffect(()=>{Zv(l,c)},[l,c]);let f=0;for(let d=l;d<=c;d++){f++;const p=i.saveData[d];let v=C.jsx("div",{});if(p){const m=p.nowStageState.showName===""?" ":`${p.nowStageState.showName}`;v=C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:Ue.Save_Load_content_element_top,children:[C.jsx("div",{className:Ue.Save_Load_content_element_top_index,children:p.index}),C.jsx("div",{className:Ue.Save_Load_content_element_top_date,children:p.saveTime})]}),C.jsx("div",{className:Ue.Save_Load_content_miniRen,children:C.jsx("img",{className:Ue.Save_Load_content_miniRen_bg,alt:"Save_img_preview",src:p.previewImage})}),C.jsxs("div",{className:Ue.Save_Load_content_text,children:[C.jsx("div",{className:Ue.Save_Load_content_speaker,children:m}),C.jsx("div",{className:Ue.Save_Load_content_text_padding,children:p.nowStageState.showText})]})]})}const g=C.jsx("div",{onClick:()=>{i.saveData[d]?(r(),as({title:h("saving.isOverwrite"),leftText:s("yes"),rightText:s("no"),leftFunc:()=>{p_(d),st()},rightFunc:()=>{}})):(t(),p_(d))},onMouseEnter:e,className:Ue.Save_Load_content_element,style:{animationDelay:`${f*30}ms`},children:v},"saveElement_"+d);u.push(g)}const h=On("menu.");return C.jsxs("div",{className:Ue.Save_Load_main,children:[C.jsxs("div",{className:Ue.Save_Load_top,children:[C.jsx("div",{className:Ue.Save_Load_title,children:C.jsx("div",{className:Ue.Save_title_text,children:h("saving.title")})}),C.jsx("div",{className:Ue.Save_Load_top_buttonList,children:o})]}),C.jsx("div",{className:Ue.Save_Load_content,id:"Save_content_page_"+n.optionData.slPage,children:u})]})},o1e=()=>{const{playSeClick:t,playSeEnter:e,playSePageChange:r}=_n(),n=Ne(h=>h.userData),i=Ne(h=>h.saveData),a=Lr(),o=[];for(let h=1;h<=20;h++){let d=Ue.Save_Load_top_button+" "+Ue.Load_top_button;h===n.optionData.slPage&&(d=d+" "+Ue.Save_Load_top_button_on+" "+Ue.Load_top_button_on);const p=C.jsx("div",{onClick:()=>{a(Xk(h)),st(),r()},onMouseEnter:e,className:d,children:C.jsx("div",{className:Ue.Save_Load_top_button_text,children:h})},"Load_element_page"+h);o.push(p)}const s=[],u=(n.optionData.slPage-1)*10+1,l=u+9;ne.useEffect(()=>{Zv(u,l)},[u,l]);let c=0;for(let h=u;h<=l;h++){c++;const d=i.saveData[h];let p=C.jsx("div",{});if(d){const g=d.nowStageState.showName===""?" ":`${d.nowStageState.showName}`;p=C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:Ue.Save_Load_content_element_top,children:[C.jsx("div",{className:Ue.Save_Load_content_element_top_index+" "+Ue.Load_content_elememt_top_index,children:d.index}),C.jsx("div",{className:Ue.Save_Load_content_element_top_date+" "+Ue.Load_content_element_top_date,children:d.saveTime})]}),C.jsx("div",{className:Ue.Save_Load_content_miniRen,children:C.jsx("img",{className:Ue.Save_Load_content_miniRen_bg,alt:"Save_img_preview",src:d.previewImage})}),C.jsxs("div",{className:Ue.Save_Load_content_text,children:[C.jsx("div",{className:Ue.Save_Load_content_speaker+" "+Ue.Load_content_speaker,children:g}),C.jsx("div",{className:Ue.Save_Load_content_text_padding,children:d.nowStageState.showText})]})]})}const v=C.jsx("div",{onClick:()=>{fN(h),t()},onMouseEnter:e,className:Ue.Save_Load_content_element,style:{animationDelay:`${c*30}ms`},children:p},"loadElement_"+h);s.push(v)}const f=On("menu.");return C.jsxs("div",{className:Ue.Save_Load_main,children:[C.jsxs("div",{className:Ue.Save_Load_top,children:[C.jsx("div",{className:Ue.Save_Load_title,children:C.jsx("div",{className:Ue.Load_title_text,children:f("loadSaving.title")})}),C.jsx("div",{className:Ue.Save_Load_top_buttonList,children:o})]}),C.jsx("div",{className:Ue.Save_Load_content,id:"Load_content_page_"+n.optionData.slPage,children:s})]})},s1e="_Options_main_u5orq_2",l1e="_Options_top_u5orq_9",u1e="_Options_title_u5orq_16",c1e="_Option_title_text_u5orq_25",f1e="_Elements_in_u5orq_1",h1e="_Option_title_text_shadow_u5orq_34",d1e="_Option_title_text_ts_u5orq_41",p1e="_Options_main_content_u5orq_48",v1e="_Options_main_content_half_u5orq_55",m1e="_About_title_text_u5orq_65",g1e="_About_text_u5orq_73",y1e="_Options_page_container_u5orq_92",_1e="_Options_button_list_u5orq_98",x1e="_Options_page_button_u5orq_102",b1e="_Options_page_button_active_u5orq_114",un={Options_main:s1e,Options_top:l1e,Options_title:u1e,Option_title_text:c1e,Elements_in:f1e,Option_title_text_shadow:h1e,Option_title_text_ts:d1e,Options_main_content:p1e,Options_main_content_half:v1e,About_title_text:m1e,About_text:g1e,Options_page_container:y1e,Options_button_list:_1e,Options_page_button:x1e,Options_page_button_active:b1e},S1e="_NormalOption_ogzuv_1",w1e="_Elements_in_ogzuv_1",E1e="_NormalOption_title_ogzuv_10",T1e="_NormalOption_title_bef_ogzuv_19",A1e="_NormalOption_title_sd_ogzuv_29",C1e="_NormalOption_buttonList_ogzuv_39",Wy={NormalOption:S1e,Elements_in:w1e,NormalOption_title:E1e,NormalOption_title_bef:T1e,NormalOption_title_sd:A1e,NormalOption_buttonList:C1e},Kr=t=>C.jsxs("div",{className:Wy.NormalOption,style:{width:t.full?"100%":"auto"},children:[C.jsx("div",{className:Wy.NormalOption_title,children:t.title}),C.jsx("div",{className:Wy.NormalOption_buttonList,style:{width:t.full?"100%":"auto"},children:t.children})]}),P1e="_NormalButton_1qk3b_1",O1e="_NormalButtonChecked_1qk3b_18",Yy={NormalButton:P1e,NormalButtonChecked:O1e},Ia=t=>{const e=t.textList.length,r=[],{playSeEnter:n,playSeSwitch:i}=_n();for(let a=0;a{i(),t.functionList[a]()},onMouseEnter:n,children:t.textList[a]},t.textList[a]+a+t);r.push(o)}else{const o=C.jsx("div",{className:Yy.NormalButton,onClick:()=>{i(),t.functionList[a]()},onMouseEnter:n,children:t.textList[a]},t.textList[a]+a);r.push(o)}return C.jsx(C.Fragment,{children:r})};function R1e(t){return Is[t]}function oB(){const{i18n:t}=Qv(),e=du(n=>n.userData),r=Lr();return(n,i=!0)=>{var s;const a=n??((s=e.current)==null?void 0:s.optionData.language)??Is.zhCn,o=R1e(a);t.changeLanguage(o),r(Ct({key:"language",value:a})),ge.info("设置语言: "+o),window==null||window.localStorage.setItem("lang",a.toString()),i&&st()}}const I1e="_backButton_qbk37_1",k1e="_about_qbk37_16",M1e="_icon_qbk37_20",F1e="_title_qbk37_24",N1e="_text_qbk37_34",L1e="_contributor_qbk37_43",Wn={backButton:I1e,about:k1e,icon:M1e,title:F1e,text:N1e,contributor:L1e};function D1e(t){const e=On("menu.options.pages.system.options.about.");return C.jsxs("div",{className:Wn.about,children:[C.jsx("div",{className:Wn.backButton,onClick:t.onClose,children:C.jsx(axe,{className:Wn.icon,theme:"outline",size:"35",strokeWidth:3,fill:"#333"})}),C.jsx("div",{className:Wn.title,children:e("subTitle")}),C.jsx("div",{className:Wn.title,children:e("version")}),C.jsx("div",{className:Wn.text,children:Q3.version}),C.jsx("div",{className:Wn.title,children:e("source")}),C.jsx("div",{className:Wn.text,children:C.jsx("a",{target:"_blank",href:"https://github.com/OpenWebGAL/WebGAL",children:"https://github.com/OpenWebGAL/WebGAL"})}),C.jsx("div",{className:Wn.title,children:e("contributors")}),C.jsx("div",{className:Wn.text,children:C.jsx("a",{target:"_blank",href:"https://github.com/OpenWebGAL/WebGAL/graphs/contributors",children:"https://github.com/OpenWebGAL/WebGAL/graphs/contributors"})}),C.jsx("div",{className:Wn.title,children:e("website")}),C.jsx("div",{className:Wn.text,children:C.jsx("a",{target:"_blank",href:"https://openwebgal.com/",children:"https://openwebgal.com/"})})]})}function B1e(){const t=Ne(h=>h.userData),e=Ne(h=>h.saveData),r=Lr(),n=oB(),i=On("menu.options.pages.system.options."),{playSeDialogOpen:a}=_n();function o(){const d=JSON.stringify({userData:t,saves:e});if(d!==null){const p=new Blob([d],{type:"application/json"}),v=URL.createObjectURL(p),g=document.createElement("a");g.href=v,g.download="saves.json",g.click(),g.remove()}}function s(h){const d=h.target.files[0],p=new FileReader;p.onload=v=>{const g=v.target.result;try{const m=JSON.parse(g);a(),as({title:i("gameSave.dialogs.import.title"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:async()=>{await Os.setItem(L.gameKey,m.userData).then(()=>{ge.info(i("gameSave.dialogs.import.tip"))}),Jc(),te.dispatch(Oa.replaceSaveGame(m.saves.saveData)),te.dispatch(Oa.setFastSave(m.saves.quickSaveData)),_d(),yd(0,200)},rightFunc:()=>{}})}catch(m){ge.error(i("gameSave.dialogs.import.error"),m)}},p.readAsText(d,"UTF-8")}function u(){const h=document.createElement("input");h.type="file",h.onchange=s,h.click()}const[l,c]=ne.useState(!1);function f(){c(!l)}return C.jsxs("div",{className:un.Options_main_content_half,children:[l&&C.jsx(D1e,{onClose:f}),!l&&C.jsxs(C.Fragment,{children:[C.jsx(Kr,{title:i("autoSpeed.title"),children:C.jsx(Ia,{textList:i("autoSpeed.options.slow","autoSpeed.options.medium","autoSpeed.options.fast"),functionList:[()=>{r(Ct({key:"autoSpeed",value:hn.slow})),st()},()=>{r(Ct({key:"autoSpeed",value:hn.normal})),st()},()=>{r(Ct({key:"autoSpeed",value:hn.fast})),st()}],currentChecked:t.optionData.autoSpeed})},"option1"),C.jsx(Kr,{title:i("language.title"),children:C.jsx(Ia,{currentChecked:t.optionData.language,textList:Object.values(ip),functionList:Object.keys(ip).map(h=>()=>n(Is[h]))})},"option7"),C.jsx(Kr,{title:i("resetData.title"),children:C.jsx(Ia,{textList:i("resetData.options.clearGameSave","resetData.options.resetSettings","resetData.options.clearAll"),functionList:[()=>{a(),as({title:i("resetData.dialogs.clearGameSave"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(Oa.resetSaves()),yd(0,200),_d()},rightFunc:()=>{}})},()=>{a(),as({title:i("resetData.dialogs.resetSettings"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(uW()),hp()},rightFunc:()=>{}})},()=>{a(),as({title:i("resetData.dialogs.clearAll"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(cW()),hp(),r(Oa.resetSaves()),yd(0,200),_d()},rightFunc:()=>{}})}],currentChecked:3})},"option2"),C.jsx(Kr,{title:i("gameSave.title"),children:C.jsx(Ia,{textList:i("gameSave.options.export","gameSave.options.import"),functionList:[o,u],currentChecked:2})},"option3"),C.jsx("div",{className:un.About_title_text,onClick:f,children:C.jsx("span",{className:un.About_text,children:i("about.title")})})]})]})}const j1e="_textPreviewMain_nolr3_1",U1e="_textbox_nolr3_8",AO={textPreviewMain:j1e,textbox:U1e},$1e=t=>{const e=On("menu.options.pages.display.options."),r=Ne(x=>x.userData),i=Ne(x=>x.stage).bgName,a=gS(r.optionData.textSpeed),o=MF(r.optionData.textSpeed),s=r.optionData.textboxOpacity,u=c_(r.optionData.textSize)+"%",l=FF(),c=navigator.userAgent,f=/firefox/i.test(c),h=/^((?!chrome|android).)*safari/i.test(c),d=e("textPreview.text"),p=gs(d,3),v=e("textPreview.title"),g=gs(v,3),m=v!=="",y=NF,_={textArray:p,isText:!0,textDelay:a,isHasName:m,showName:g,currentConcatDialogPrev:"",fontSize:u,currentDialogKey:"",isSafari:h,isFirefox:f,miniAvatar:"",textDuration:o,font:l,textSizeState:u,lineLimit:3,isUseStroke:!0,textboxOpacity:s};return C.jsx("div",{className:AO.textPreviewMain,style:{background:i?`bottom / cover no-repeat url(${i})`:"rgba(0, 0, 0, 0.1)"},children:C.jsx("div",{className:AO.textbox,children:C.jsx(y,{..._})},`previewTextbox-${a}`)})};const el=t=>{const{playSeEnter:e}=_n();return ne.useEffect(()=>{setTimeout(()=>{const r=document.getElementById(t.uniqueID);r!==null&&r.setAttribute("value",t.initValue.toString())},1)},[]),C.jsx("div",{className:"Option_WebGAL_slider",children:C.jsx("input",{id:t.uniqueID,type:"range",onChange:t.onChange,onFocus:e,onMouseEnter:e})})};function V1e(){const t=Ne(n=>n.userData),e=Lr(),r=On("menu.options.pages.display.options.");return C.jsxs("div",{className:un.Options_main_content_half,children:[C.jsx(Kr,{title:r("fullScreen.title"),children:C.jsx(Ia,{textList:r("fullScreen.options.on","fullScreen.options.off"),functionList:[()=>{e(Ct({key:"fullScreen",value:Qi.on})),st()},()=>{e(Ct({key:"fullScreen",value:Qi.off})),st()}],currentChecked:t.optionData.fullScreen})},"fullScreen"),C.jsx(Kr,{title:r("textSpeed.title"),children:C.jsx(Ia,{textList:r("textSpeed.options.slow","textSpeed.options.medium","textSpeed.options.fast"),functionList:[()=>{e(Ct({key:"textSpeed",value:hn.slow})),st()},()=>{e(Ct({key:"textSpeed",value:hn.normal})),st()},()=>{e(Ct({key:"textSpeed",value:hn.fast})),st()}],currentChecked:t.optionData.textSpeed})},"textSpeed"),C.jsx(Kr,{title:r("textSize.title"),children:C.jsx(Ia,{textList:r("textSize.options.small","textSize.options.medium","textSize.options.large"),functionList:[()=>{e(Ct({key:"textSize",value:ti.small})),st()},()=>{e(Ct({key:"textSize",value:ti.medium})),st()},()=>{e(Ct({key:"textSize",value:ti.large})),st()}],currentChecked:t.optionData.textSize})},"textSize"),C.jsx(Kr,{title:r("textFont.title"),children:C.jsx(Ia,{textList:r("textFont.options.siYuanSimSun","textFont.options.SimHei","textFont.options.lxgw"),functionList:[()=>{e(Ct({key:"textboxFont",value:Zi.song})),st()},()=>{e(Ct({key:"textboxFont",value:Zi.hei})),st()},()=>{e(Ct({key:"textboxFont",value:Zi.lxgw})),st()}],currentChecked:t.optionData.textboxFont})},"textFont"),C.jsx(Kr,{title:r("textboxOpacity.title"),children:C.jsx(el,{initValue:t.optionData.textboxOpacity,uniqueID:r("textboxOpacity.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"textboxOpacity",value:Number(i)})),st()}})},"textboxOpacity"),C.jsx(Kr,{full:!0,title:r("textPreview.title"),children:C.jsx($1e,{})},"textPreview")]})}function G1e(){const t=Ne(n=>n.userData),e=Lr(),r=On("menu.options.pages.sound.options.");return C.jsxs("div",{className:un.Options_main_content_half,children:[C.jsx(Kr,{title:r("volumeMain.title"),children:C.jsx(el,{initValue:t.optionData.volumeMain,uniqueID:r("volumeMain.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"volumeMain",value:Number(i)})),st()}})},"option4"),C.jsx(Kr,{title:r("vocalVolume.title"),children:C.jsx(el,{initValue:t.optionData.vocalVolume,uniqueID:r("vocalVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"vocalVolume",value:Number(i)})),st()}})},"option5"),C.jsx(Kr,{title:r("bgmVolume.title"),children:C.jsx(el,{initValue:t.optionData.bgmVolume,uniqueID:r("bgmVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"bgmVolume",value:Number(i)})),st()}})},"option6"),C.jsx(Kr,{title:r("seVolume.title"),children:C.jsx(el,{initValue:t.optionData.seVolume,uniqueID:r("seVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"seVolume",value:Number(i)})),st()}})},"option7"),C.jsx(Kr,{title:r("uiSeVolume.title"),children:C.jsx(el,{initValue:t.optionData.uiSeVolume,uniqueID:r("uiSeVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"uiSeVolume",value:Number(i)})),st()}})},"option8"),C.jsx(Kr,{title:r("voiceOption.title"),children:C.jsx(Ia,{textList:r("voiceStop.title","voiceContinue.title"),functionList:[()=>{e(Ct({key:"voiceInterruption",value:zc.yes})),st()},()=>{e(Ct({key:"voiceInterruption",value:zc.no})),st()}],currentChecked:t.optionData.voiceInterruption})},"option9")]})}const X1e=()=>{const{playSeEnter:t,playSeSwitch:e}=_n(),r=wi(0);ne.useEffect(Jc,[]);function n(a){return a===r.value?un.Options_page_button+" "+un.Options_page_button_active:un.Options_page_button}const i=On("menu.options.");return C.jsxs("div",{className:un.Options_main,children:[C.jsx("div",{className:un.Options_top,children:C.jsx("div",{className:un.Options_title,children:C.jsx("div",{className:un.Option_title_text,children:i("title")})})}),C.jsxs("div",{className:un.Options_page_container,children:[C.jsxs("div",{className:un.Options_button_list,children:[C.jsx("div",{onClick:()=>{r.set(0),e()},className:n(0),onMouseEnter:t,children:i("pages.system.title")}),C.jsx("div",{onClick:()=>{r.set(1),e()},className:n(1),onMouseEnter:t,children:i("pages.display.title")}),C.jsx("div",{onClick:()=>{r.set(2),e()},className:n(2),onMouseEnter:t,children:i("pages.sound.title")})]}),C.jsxs("div",{className:un.Options_main_content,children:[r.value===1&&C.jsx(V1e,{}),r.value===0&&C.jsx(B1e,{}),r.value===2&&C.jsx(G1e,{})]})]})]})},z1e=()=>{const t=Ne(r=>r.GUI);let e;switch(t.currentMenuTag){case vt.Save:e=C.jsx(a1e,{});break;case vt.Load:e=C.jsx(o1e,{});break;case vt.Option:e=C.jsx(X1e,{});break}return C.jsx(C.Fragment,{children:t.showMenuPanel&&C.jsxs("div",{className:SO.Menu_main,children:[C.jsx("div",{className:SO.Menu_TagContent,children:e}),C.jsx(Pxe,{})]})})},W1e="_MainStage_main_9enex_1",Y1e="_MainStage_main_container_9enex_10",H1e="_MainStage_bgContainer_9enex_17",q1e="_MainStage_showBgSoftly_9enex_1",K1e="_MainStage_bgContainer_Settled_9enex_27",Z1e="_MainStage_oldBgContainer_9enex_37",Q1e="_MainStage_oldBgFadeout_9enex_1",J1e="_MainStage_oldBgContainer_Settled_9enex_47",ebe="_pixiContainer_9enex_72",tbe="_chooseContainer_9enex_77",Hy={MainStage_main:W1e,MainStage_main_container:Y1e,MainStage_bgContainer:H1e,MainStage_showBgSoftly:q1e,MainStage_bgContainer_Settled:K1e,MainStage_oldBgContainer:Z1e,MainStage_oldBgFadeout:Q1e,MainStage_oldBgContainer_Settled:J1e,pixiContainer:ebe,chooseContainer:tbe},rbe=()=>{var v;const t=Ne(g=>g.stage),e=Ne(g=>g.GUI.titleBgm),r=Ne(g=>g.GUI.showTitle),n=Ne(g=>g.userData),i=n.optionData.volumeMain,a=i*.01*n.optionData.vocalVolume*.01*t.vocalVolume*.01,o=i*.01*n.optionData.bgmVolume*.01*t.bgm.volume*.01,s=t.bgm.enter,u=t.uiSe,l=i*.01*(((v=n.optionData)==null?void 0:v.seVolume)??100)*.01,c=i*.01*(n.optionData.uiSeVolume??50)*.01,f=Ne(g=>g.GUI.isEnterGame),[h,d]=ne.useState(setTimeout(()=>{},0)),p=(g,m,y)=>{y>=0?g.volume=0:g.volume=m;const _=10,x=m/y*_,b=()=>{const S=setTimeout(()=>{g.volume+x>=m?g.volume=m:g.volume+x<=0?(g.volume=0,te.dispatch(Ge({key:"bgm",value:{src:"",enter:0,volume:100}}))):(g.volume+=x,b())},_);d(S)};b()};return ne.useEffect(()=>{clearTimeout(h);const g=document.getElementById("currentBgm");g&&(s===0?g.volume=o:p(g,o,s))},[r,e,t.bgm.src,o,s]),ne.useEffect(()=>{ge.debug(`设置背景音量:${o}`)},[o]),ne.useEffect(()=>{ge.debug(`设置背景音量淡入时间: ${s}`)},[s]),ne.useEffect(()=>{ge.debug(`设置语音音量:${a}`);const g=document.getElementById("currentVocal");g&&(g.volume=a.toString())},[a]),ne.useEffect(()=>{if(u==="")return;const g=document.createElement("audio");g.src=u,g.loop=!1,isNaN(c)?(ge.error("UI SE Vol is NaN"),g.volume=isNaN(l)?i/100:l/100):g.volume=c,g.play(),g.addEventListener("ended",()=>{g.remove()}),te.dispatch(Ge({key:"uiSe",value:""}))},[u]),ne.useEffect(()=>{ge.debug(`设置音效音量: ${l}`)},[l]),ne.useEffect(()=>{ge.debug(`设置用户界面音效音量: ${c}`)},[c]),C.jsxs("div",{children:[C.jsx("audio",{id:"currentBgm",src:r?e:t.bgm.src,loop:!0,autoPlay:f},r.toString()+e),C.jsx("audio",{id:"currentVocal",src:t.playVocal})]})},nbe=()=>{const t=Ne(i=>i.stage);let e="100%",r="100%",n="0";return t.enableFilm!==""&&(r="76%",n="12%"),C.jsx("div",{className:Bi.FullScreenPerform_main,style:{width:e,height:r,top:n},children:C.jsx("div",{id:"videoContainer"})})},ibe="_TextBox_EventHandler_449dq_2",abe="_TextBox_main_449dq_10",obe="_showSoftly_449dq_1",sbe="_TextBox_textElement_449dq_38",lbe="_TextBox_textElement_start_449dq_43",ube="_TextDelayShow_449dq_1",cbe="_TextBox_textElement_Settled_449dq_48",fbe="_TextBox_showName_449dq_52",hbe="_miniAvatarContainer_449dq_68",dbe="_miniAvatarImg_449dq_76",qy={TextBox_EventHandler:ibe,TextBox_main:abe,showSoftly:obe,TextBox_textElement:sbe,TextBox_textElement_start:lbe,TextDelayShow:ube,TextBox_textElement_Settled:cbe,TextBox_showName:fbe,miniAvatarContainer:hbe,miniAvatarImg:dbe},pbe=()=>{const t=Ne(o=>o.stage),e=Ne(o=>o.userData);ne.useEffect(()=>{});const r=hW.textInitialDelay-20*e.optionData.textSpeed,n=e.optionData.textSize*50+200+"%",a=t.showText.split("").map((o,s)=>{let u=s*r,l=t.currentConcatDialogPrev.length;return t.currentConcatDialogPrev!==""&&s>=l&&(u=u-l*r),s{var n,i;const r="bg-main";if(e!==""){const a=(n=L.gameplay.pixiStage)==null?void 0:n.getStageObjByKey(r);a&&a.sourceUrl!==e&&CO(a),mbe(void 0,r,e),Wf(e),ge.debug("重设背景");const{duration:o,animation:s}=Ka("bg-main","enter",!0);L.gameplay.pixiStage.registerPresetAnimation(s,"bg-main-softin",r,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects("bg-main-softin"),o)}else{const a=(i=L.gameplay.pixiStage)==null?void 0:i.getStageObjByKey(r);a&&CO(a)}},[e])}function CO(t){var o,s;(o=L.gameplay.pixiStage)==null||o.removeAnimationWithSetEffects("bg-main-softin");const e=t.key;t.key="bg-main-off"+String(new Date().getTime());const r=t.key,n=t.key+"-softoff";(s=L.gameplay.pixiStage)==null||s.removeStageObjectByKey(e);const{duration:i,animation:a}=Ka("bg-main-off","exit",!0,r);L.gameplay.pixiStage.registerAnimation(a,n,r),setTimeout(()=>{var u,l;(u=L.gameplay.pixiStage)==null||u.removeAnimation(n),(l=L.gameplay.pixiStage)==null||l.removeStageObjectByKey(r)},i)}function mbe(t,...e){var n,i;return e[1].endsWith(".skel")?(n=L.gameplay.pixiStage)==null?void 0:n.addSpineBg(...e):(i=L.gameplay.pixiStage)==null?void 0:i.addBg(...e)}function gbe(t){const{figNameLeft:e,figName:r,figNameRight:n,freeFigure:i,live2dMotion:a,live2dExpression:o}=t;ne.useEffect(()=>{var s;for(const u of a)(s=L.gameplay.pixiStage)==null||s.changeModelMotionByKey(u.target,u.motion)},[a]),ne.useEffect(()=>{var s;for(const u of o)(s=L.gameplay.pixiStage)==null||s.changeModelExpressionByKey(u.target,u.expression)},[o]),ne.useEffect(()=>{var l,c;const s="fig-center",u="fig-center-softin";if(r!==""){const f=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==r&&ba(f,u,t.effects),Ku(void 0,s,r,"center"),ge.debug("中立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");L.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{ge.debug("移除中立绘");const f=(c=L.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==r&&ba(f,u,t.effects)}},[r]),ne.useEffect(()=>{var l,c;const s="fig-left",u="fig-left-softin";if(e!==""){const f=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==e&&ba(f,u,t.effects),Ku(void 0,s,e,"left"),ge.debug("左立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");L.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{ge.debug("移除左立绘");const f=(c=L.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==e&&ba(f,u,t.effects)}},[e]),ne.useEffect(()=>{var l,c;const s="fig-right",u="fig-right-softin";if(n!==""){const f=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==n&&ba(f,u,t.effects),Ku(void 0,s,n,"right"),ge.debug("右立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");L.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{const f=(c=L.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==n&&ba(f,u,t.effects)}},[n]),ne.useEffect(()=>{var u,l,c;for(const f of i){const h=`${f.key}`,d=`${f.key}-softin`;if(f.name!==""){const p=(u=L.gameplay.pixiStage)==null?void 0:u.getStageObjByKey(h);if(p){if(p.sourceUrl!==f.name){ba(p,d,t.effects),Ku(void 0,h,f.name,f.basePosition),ge.debug(`${f.key}立绘已重设`);const{duration:v,animation:g}=Ka(h,"enter");L.gameplay.pixiStage.registerPresetAnimation(g,d,h,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(d),v)}}else{Ku(void 0,h,f.name,f.basePosition),ge.debug(`${f.key}立绘已重设`);const{duration:v,animation:g}=Ka(h,"enter");L.gameplay.pixiStage.registerPresetAnimation(g,d,h,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(d),v)}}else{const p=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(h);p&&p.sourceUrl!==f.name&&ba(p,d,t.effects)}}const s=(c=L.gameplay.pixiStage)==null?void 0:c.getFigureObjects();if(s){for(const f of s)if(!(f.key==="fig-left"||f.key==="fig-center"||f.key==="fig-right"||f.key.endsWith("-off"))){const h=f.key;if(i.findIndex(p=>p.key===h)<0){const p=`${f.key}-softin`;ba(f,p,t.effects)}}}},[i])}function ba(t,e,r){var l,c,f;if((l=L.gameplay.pixiStage)==null||l.removeAnimationWithSetEffects(e),L.gameplay.isFast){ge.debug("快速模式,立刻关闭立绘"),(c=L.gameplay.pixiStage)==null||c.removeStageObjectByKey(t.key);return}const n=t.key,i=n+"-off";t.key=n+String(new Date().getTime())+"-off";const a=t.key;(f=L.gameplay.pixiStage)==null||f.removeStageObjectByKey(n);const o=a+"-softoff",{duration:s,animation:u}=Ka(i,"exit",!1,a);L.gameplay.pixiStage.registerPresetAnimation(u,o,a,r),setTimeout(()=>{var h,d;(h=L.gameplay.pixiStage)==null||h.removeAnimation(o),(d=L.gameplay.pixiStage)==null||d.removeStageObjectByKey(a)},s)}function Ku(t,...e){var n,i;const r=e[1];return r.endsWith(".json")?ybe(...e):r.endsWith(".skel")?(n=L.gameplay.pixiStage)==null?void 0:n.addSpineFigure(...e):(i=L.gameplay.pixiStage)==null?void 0:i.addFigure(...e)}function ybe(...t){}function _be(t){const e=t.effects;setTimeout(()=>{xbe(e)},10)}function xbe(t){var r,n,i,a;const e=((r=L.gameplay.pixiStage)==null?void 0:r.getAllStageObj())??[];for(const o of e){const s=o.key,u=t.find(c=>c.target===s);if(!(((n=L.gameplay.pixiStage)==null?void 0:n.getAllLockedObject())??[]).includes(s))if(u){const c=(i=L.gameplay.pixiStage)==null?void 0:i.getStageObjByKey(s);if(c){const f=c.pixiContainer;Object.assign(f,PO(u.transform))}}else{const c=(a=L.gameplay.pixiStage)==null?void 0:a.getStageObjByKey(s);if(c){const f=c.pixiContainer;Object.assign(f,PO(Kb))}}}}function PO(t){if(!t)return{};const{position:e,alpha:r,...n}=t;return{...n,x:e.x,y:e.y,alphaFilterVal:r}}function bbe(){const t=Ne(e=>e.stage);return vbe(t),gbe(t),_be(t),C.jsx("div",{style:{display:"none"}})}const Sbe="_introContainer_119k8_1",wbe={introContainer:Sbe};function Ebe(){return C.jsx("div",{className:wbe.introContainer,id:"introContainer"})}function OO(t){const e=document.getElementById("textBoxMain");if(!e)return!1;let r=e.getBoundingClientRect();return t.clientX>r.left&&t.clientXr.top&&t.clientY{n(rt({component:"controlsVisibility",visibility:!1}))},1e3)):Tbe(t,r,n)}const Pbe=()=>{const t=Ne(n=>n.stage),e=Ne(n=>n.GUI),r=Lr();return $se(),C.jsxs("div",{className:Hy.MainStage_main,children:[C.jsx(nbe,{}),C.jsx(bbe,{}),C.jsx("div",{id:"pixiContianer",className:Hy.pixiContainer,style:{zIndex:ME?"-5":void 0}}),C.jsx("div",{id:"chooseContainer",className:Hy.chooseContainer}),e.showTextBox&&t.enableFilm===""&&!t.isDisableTextbox&&C.jsx(sae,{}),e.showTextBox&&t.enableFilm!==""&&C.jsx(pbe,{}),C.jsx(rbe,{}),C.jsx("div",{onClick:()=>{if(!e.showTextBox){r(rt({component:"showTextBox",visibility:!0}));return}MS(),tn()},onDoubleClick:()=>{L.events.fullscreenDbClick.emit()},id:"FullScreenClick",style:{width:"100%",height:"100%",position:"absolute",zIndex:"12",top:"0"},onMouseMove:n=>!e.showControls&&Cbe(n,t,e,r)}),C.jsx(Ebe,{})]})},Obe=()=>{const t=On("gaming."),e=2.5,{i18n:r}=Qv(),{playSeEnter:n,playSeClick:i,playSeDialogOpen:a}=_n(),s=r.language==="fr";let u=42,l="150%";s&&(l="125%",u=40);const c=Ne(m=>m.GUI),f=Ne(m=>m.stage),h=Lr(),d=(m,y)=>{h(rt({component:m,visibility:y}))},p=m=>{h(ss(m))},v=Ne(m=>m.saveData.saveData);let g=C.jsx("div",{style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:C.jsx("div",{style:{fontSize:"125%"},children:t("noSaving")})});if(v[0]){const m=v[0];g=C.jsxs("div",{className:Ie.slPreviewMain,children:[C.jsx("div",{className:Ie.imgContainer,children:C.jsx("img",{style:{height:"100%"},alt:"q-save-preview image",src:m.previewImage})}),C.jsxs("div",{className:Ie.textContainer,children:[C.jsx("div",{children:m.nowStageState.showName}),C.jsx("div",{style:{fontSize:"75%",color:"rgb(55,60,56)"},children:m.nowStageState.showText})]})]})}return C.jsx(C.Fragment,{children:c.showTextBox&&f.enableFilm===""&&C.jsxs("div",{className:Ie.main,style:{visibility:c.controlsVisibility?"visible":"hidden"},children:[c.showTextBox&&C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{d("showTextBox",!1),i()},onMouseEnter:n,children:[C.jsx(uxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.hide")})]}),!c.showTextBox&&C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{d("showTextBox",!0),i()},onMouseEnter:n,children:[C.jsx(cxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.show")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{d("showBacklog",!0),d("showTextBox",!1),i()},onMouseEnter:n,children:[C.jsx(Q_e,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.backlog")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{let m=document.getElementById("currentVocal");m!==null&&(m.currentTime=0,m.pause(),m==null||m.play()),i()},onMouseEnter:n,children:[C.jsx(fxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.replay")})]}),C.jsxs("span",{id:"Button_ControlPanel_auto",className:Ie.singleButton,style:{fontSize:l},onClick:()=>{EN(),i()},onMouseEnter:n,children:[C.jsx(nB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.auto")})]}),C.jsxs("span",{id:"Button_ControlPanel_fast",className:Ie.singleButton,style:{fontSize:l},onClick:()=>{PN(),i()},onMouseEnter:n,children:[C.jsx(exe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.forward")})]}),C.jsxs("span",{className:Ie.singleButton+" "+Ie.fastsave,style:{fontSize:l},onClick:()=>{p_(0),i()},onMouseEnter:n,children:[C.jsx(J_e,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.quicklySave")}),C.jsx("div",{className:Ie.fastSlPreview+" "+Ie.fastSPreview,children:g})]}),C.jsxs("span",{className:Ie.singleButton+" "+Ie.fastload,style:{fontSize:l},onClick:()=>{fN(0),i()},onMouseEnter:n,children:[C.jsx(txe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.quicklyLoad")}),C.jsx("div",{className:Ie.fastSlPreview+" "+Ie.fastLPreview,children:g})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{p(vt.Save),d("showMenuPanel",!0),i()},onMouseEnter:n,children:[C.jsx(iB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.save")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{p(vt.Load),d("showMenuPanel",!0),i()},onMouseEnter:n,children:[C.jsx(tB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.load")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{p(vt.Option),d("showMenuPanel",!0),i()},onMouseEnter:n,children:[C.jsx(aB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.options")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{a(),as({title:t("buttons.titleTips"),leftText:t("$common.yes"),rightText:t("$common.no"),leftFunc:()=>{FE()},rightFunc:()=>{}})},onMouseEnter:n,children:[C.jsx(rB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.title")})]}),C.jsx("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{Cxe(),i()},onMouseEnter:n,children:c.showControls?C.jsx(oxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}):C.jsx(pxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e})})]})})},Rbe=()=>{var h,d;const t=On("gaming."),{playSeEnter:e,playSeClick:r}=_n(),n=Ne(p=>p.GUI),i=Lr(),a="0.8em",[o,s]=ne.useState(!1),[u,l]=ne.useState(!1);let c=ne.useRef();const f=ne.useMemo(()=>{let p=[];for(let v=0;vA.map(O=>O.reactNode)),x=RO(y).map((A,O)=>C.jsx("div",{children:A.map((P,k)=>P==="

"?C.jsx("br",{},`br${k}`):P)},`backlog-line-${O}`)),S=gs(g.currentStageState.showName,3,!0).map(A=>A.map(O=>O.reactNode)),E=RO(S).map((A,O)=>C.jsx("div",{children:A.map((P,k)=>P==="
"?C.jsx("br",{},`br${k}`):P)},`backlog-line-${O}`)),T=C.jsxs("div",{className:Ur.backlog_item,style:{animationDelay:`${20*(L.backlogManager.getBacklog().length-v)}ms`},children:[C.jsxs("div",{className:Ur.backlog_func_area,children:[C.jsxs("div",{className:Ur.backlog_item_button_list,children:[C.jsx("div",{onClick:A=>{r(),cN(v),A.preventDefault(),A.stopPropagation()},onMouseEnter:e,className:Ur.backlog_item_button_element,children:C.jsx(hxe,{theme:"outline",size:a,fill:"#ffffff",strokeWidth:3})}),g.currentStageState.vocal?C.jsx("div",{onClick:()=>{r();const A=document.getElementById("backlog_audio_play_element_"+v);if(A){A.currentTime=0;const O=te.getState().userData,P=O.optionData.volumeMain;A.volume=P*.01*O.optionData.vocalVolume*.01,A==null||A.play()}},onMouseEnter:e,className:Ur.backlog_item_button_element,children:C.jsx(vxe,{theme:"outline",size:a,fill:"#ffffff",strokeWidth:3})}):null]}),C.jsx("div",{className:Ur.backlog_item_content_name,children:E})]}),C.jsx("div",{className:Ur.backlog_item_content,children:C.jsx("span",{className:Ur.backlog_item_content_text,children:x})}),C.jsx("audio",{id:"backlog_audio_play_element_"+v,src:g.currentStageState.vocal})]},"backlogItem"+g.currentStageState.showText+g.saveScene.currentSentenceId);p.unshift(T)}return p},[((d=(h=L.backlogManager.getBacklog()[L.backlogManager.getBacklog().length-1])==null?void 0:h.saveScene)==null?void 0:d.currentSentenceId)??0]);return ne.useEffect(()=>{n.showBacklog?(c.current&&clearTimeout(c.current),s(!1),l(!0),setTimeout(()=>{l(!1)},0)):c.current=setTimeout(()=>{s(!0),c.current=void 0},700+80)},[n.showBacklog]),C.jsx(C.Fragment,{children:C.jsxs("div",{className:` +| iOS ユーザーは横画面での使用をお勧めします`),D_e("./game/userStyleSheet.css"),B_e(),ule("./game/config.txt");const t=Nn("start.txt",Fn.scene);ua(t).then(e=>{L.sceneManager.sceneData.currentScene=ca(e,"start.txt",t);const r=L.sceneManager.sceneData.currentScene.subSceneList;L.sceneManager.settledScenes.push(t);const n=jf(r);Uf(n)}),L.gameplay.pixiStage=new F_e,dle(),ple()};function D_e(t){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)}function B_e(){Wc.get("./game/animation/animationTable.json").then(t=>{const e=t.data;for(const r of e)Wc.get(`./game/animation/${r}.json`).then(n=>{if(n.data){const i={name:r,effects:n.data};L.animationManager.addAnimation(i)}})})}const j_e="_Menu_main_1a7i6_1",U_e="_Menu_ShowSoftly_1a7i6_1",$_e="_Menu_TagContent_1a7i6_10",wO={Menu_main:j_e,Menu_ShowSoftly:U_e,Menu_TagContent:$_e},V_e="_MenuPanel_main_1c9ky_1",G_e="_MenuPanel_button_1c9ky_10",X_e="_MenuPanel_button_icon_1c9ky_38",z_e="_MenuPanel_button_hl_1c9ky_44",fl={MenuPanel_main:V_e,MenuPanel_button:G_e,MenuPanel_button_icon:X_e,MenuPanel_button_hl:z_e};var W_e=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function EO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function TO(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function q_e(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a=0)&&(r[i]=t[i]);return r}var K_e={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};function Z_e(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function Q_e(t,e,r){var n=typeof e.fill=="string"?[e.fill]:e.fill||[],i=[],a=e.theme||r.theme;switch(a){case"outline":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.multiColor.outFillColor),i.push(typeof n[2]=="string"?n[2]:r.colors.multiColor.innerStrokeColor),i.push(typeof n[3]=="string"?n[3]:r.colors.multiColor.innerFillColor);break}return{size:e.size||r.size,strokeWidth:e.strokeWidth||r.strokeWidth,strokeLinecap:e.strokeLinecap||r.strokeLinecap,strokeLinejoin:e.strokeLinejoin||r.strokeLinejoin,colors:i,id:t}}var eB=ne.createContext(K_e);eB.Provider;function Lt(t,e,r){return function(n){var i=n.size,a=n.strokeWidth,o=n.strokeLinecap,s=n.strokeLinejoin,u=n.theme,l=n.fill,c=n.className,f=n.spin,h=H_e(n,W_e),d=ne.useContext(eB),p=ne.useMemo(Z_e,[]),v=Q_e(p,{size:i,strokeWidth:a,strokeLinecap:o,strokeLinejoin:s,theme:u,fill:l},d),g=[d.prefix+"-icon"];return g.push(d.prefix+"-icon-"+t),e&&d.rtl&&g.push(d.prefix+"-icon-rtl"),f&&g.push(d.prefix+"-icon-spin"),c&&g.push(c),fe.createElement("span",TO(TO({},h),{},{className:g.join(" ")}),r(v))}}const J_e=Lt("align-text-left-one",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M39 6H9C7.34315 6 6 7.34315 6 9V39C6 40.6569 7.34315 42 9 42H39C40.6569 42 42 40.6569 42 39V9C42 7.34315 40.6569 6 39 6Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M26 24H14",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M34 15H14",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M32 33H14",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),tB=Lt("close-small",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M14 14L34 34",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 34L34 14",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),exe=Lt("double-down",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M36 12L24 24L12 12",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M36 24L24 36L12 24",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),txe=Lt("double-right",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M12 12L24 24L12 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 12L36 24L24 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),rxe=Lt("double-up",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M12 24L24 12L36 24",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M12 36L24 24L36 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),rB=Lt("folder-open",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M4 9V41L9 21H39.5V15C39.5 13.8954 38.6046 13 37.5 13H24L19 7H6C4.89543 7 4 7.89543 4 9Z",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M40 41L44 21H8.8125L4 41H40Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),nxe=Lt("go-end",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M14 12L26 24L14 36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M34 12V36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),ixe=Lt("go-start",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M34 36L22 24L34 12",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 12V36",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),axe=Lt("hamburger-button",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M7.94971 11.9497H39.9497",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M7.94971 23.9497H39.9497",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M7.94971 35.9497H39.9497",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),nB=Lt("home",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M9 18V42H39V18L24 6L9 18Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M19 29V42H29V29H19Z",fill:t.colors[3],stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M9 42H39",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap}))}),oxe=Lt("left",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M31 36L19 24L31 12",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),sxe=Lt("lock",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("rect",{x:"6",y:"22",width:"36",height:"22",rx:"2",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 22V14C14 8.47715 18.4772 4 24 4C29.5228 4 34 8.47715 34 14V22",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 30V36",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),lxe=Lt("logout",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M23.9917 6H6V42H24",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M33 33L42 24L33 15",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M16 23.9917H42",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),uxe=Lt("music-list",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M24 19H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 10H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M8 38H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M8 28H40",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M8 10L16 15L8 20V10Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),iB=Lt("play-one",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M15 24V11.8756L25.5 17.9378L36 24L25.5 30.0622L15 36.1244V24Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),cxe=Lt("preview-close-one",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M9.85786 18C6.23858 21 4 24 4 24C4 24 12.9543 36 24 36C25.3699 36 26.7076 35.8154 28 35.4921M20.0318 12.5C21.3144 12.1816 22.6414 12 24 12C35.0457 12 44 24 44 24C44 24 41.7614 27 38.1421 30",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M20.3142 20.6211C19.4981 21.5109 19 22.6972 19 23.9998C19 26.7612 21.2386 28.9998 24 28.9998C25.3627 28.9998 26.5981 28.4546 27.5 27.5705",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M42 42L6 6",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),fxe=Lt("preview-open",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M24 36C35.0457 36 44 24 44 24C44 24 35.0457 12 24 12C12.9543 12 4 24 4 24C4 24 12.9543 36 24 36Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 29C26.7614 29 29 26.7614 29 24C29 21.2386 26.7614 19 24 19C21.2386 19 19 21.2386 19 24C19 26.7614 21.2386 29 24 29Z",fill:t.colors[3],stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),hxe=Lt("replay-music",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M21 24V18L26 21L31 24L26 27L21 30V24Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M11.2721 36.7279C14.5294 39.9853 19.0294 42 24 42C33.9411 42 42 33.9411 42 24C42 14.0589 33.9411 6 24 6C19.0294 6 14.5294 8.01472 11.2721 11.2721C9.6141 12.9301 6 17 6 17",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M6 9V17H14",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),dxe=Lt("return",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M12.9998 8L6 14L12.9998 21",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M6 14H28.9938C35.8768 14 41.7221 19.6204 41.9904 26.5C42.2739 33.7696 36.2671 40 28.9938 40H11.9984",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),aB=Lt("save",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M6 9C6 7.34315 7.34315 6 9 6H34.2814L42 13.2065V39C42 40.6569 40.6569 42 39 42H9C7.34315 42 6 40.6569 6 39V9Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.0083 6L24 13.3846C24 13.7245 23.5523 14 23 14H15C14.4477 14 14 13.7245 14 13.3846L14 6",fill:t.colors[3]}),fe.createElement("path",{d:"M24.0083 6L24 13.3846C24 13.7245 23.5523 14 23 14H15C14.4477 14 14 13.7245 14 13.3846L14 6H24.0083Z",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M9 6H34.2814",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 26H34",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 34H24.0083",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),oB=Lt("setting-two",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M18.2838 43.1713C14.9327 42.1736 11.9498 40.3213 9.58787 37.867C10.469 36.8227 11 35.4734 11 34.0001C11 30.6864 8.31371 28.0001 5 28.0001C4.79955 28.0001 4.60139 28.01 4.40599 28.0292C4.13979 26.7277 4 25.3803 4 24.0001C4 21.9095 4.32077 19.8938 4.91579 17.9995C4.94381 17.9999 4.97188 18.0001 5 18.0001C8.31371 18.0001 11 15.3138 11 12.0001C11 11.0488 10.7786 10.1493 10.3846 9.35011C12.6975 7.1995 15.5205 5.59002 18.6521 4.72314C19.6444 6.66819 21.6667 8.00013 24 8.00013C26.3333 8.00013 28.3556 6.66819 29.3479 4.72314C32.4795 5.59002 35.3025 7.1995 37.6154 9.35011C37.2214 10.1493 37 11.0488 37 12.0001C37 15.3138 39.6863 18.0001 43 18.0001C43.0281 18.0001 43.0562 17.9999 43.0842 17.9995C43.6792 19.8938 44 21.9095 44 24.0001C44 25.3803 43.8602 26.7277 43.594 28.0292C43.3986 28.01 43.2005 28.0001 43 28.0001C39.6863 28.0001 37 30.6864 37 34.0001C37 35.4734 37.531 36.8227 38.4121 37.867C36.0502 40.3213 33.0673 42.1736 29.7162 43.1713C28.9428 40.752 26.676 39.0001 24 39.0001C21.324 39.0001 19.0572 40.752 18.2838 43.1713Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 31C27.866 31 31 27.866 31 24C31 20.134 27.866 17 24 17C20.134 17 17 20.134 17 24C17 27.866 20.134 31 24 31Z",fill:t.colors[3],stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}))}),pxe=Lt("square-small",!1,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M34 12H14C12.8954 12 12 12.8954 12 14V34C12 35.1046 12.8954 36 14 36H34C35.1046 36 36 35.1046 36 34V14C36 12.8954 35.1046 12 34 12Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth}))}),vxe=Lt("unlock",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("rect",{x:"7",y:"22.0476",width:"34",height:"22",rx:"2",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M14 22V14.0047C13.9948 8.87022 17.9227 4.56718 23.0859 4.05117C28.249 3.53516 32.9673 6.97408 34 12.0059",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M24 30V36",stroke:t.colors[2],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}))}),mxe=Lt("volume-notice",!0,function(t){return fe.createElement("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},fe.createElement("path",{d:"M24 6V42C17 42 11.7985 32.8391 11.7985 32.8391H6C4.89543 32.8391 4 31.9437 4 30.8391V17.0108C4 15.9062 4.89543 15.0108 6 15.0108H11.7985C11.7985 15.0108 17 6 24 6Z",fill:t.colors[1],stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M32 15L32 15C32.6232 15.5565 33.1881 16.1797 33.6841 16.8588C35.1387 18.8504 36 21.3223 36 24C36 26.6545 35.1535 29.1067 33.7218 31.0893C33.2168 31.7885 32.6391 32.4293 32 33",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin}),fe.createElement("path",{d:"M34.2359 41.1857C40.0836 37.6953 44 31.305 44 24C44 16.8085 40.2043 10.5035 34.507 6.97906",stroke:t.colors[0],strokeWidth:t.strokeWidth,strokeLinecap:t.strokeLinecap}))}),gxe=t=>{let e;switch(t.iconName){case"save":e=C.jsx(aB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"load":e=C.jsx(rB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"option":e=C.jsx(oB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"title":e=C.jsx(nB,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;case"exit":e=C.jsx(lxe,{theme:"outline",size:"1.2em",fill:t.iconColor,strokeWidth:2});break;default:e=C.jsx("div",{})}return e},qu=t=>{const{playSePageChange:e,playSeEnter:r}=_n();let n=fl.MenuPanel_button;return t.hasOwnProperty("buttonOnClassName")&&(n=n+t.buttonOnClassName),C.jsxs("div",{className:n,onClick:()=>{t.clickFunc()},onMouseEnter:r,style:{...t.style,color:t.tagColor},children:[C.jsx("div",{className:fl.MenuPanel_button_icon,children:C.jsx(gxe,{iconName:t.iconName,iconColor:t.iconColor})}),t.tagName]})},NE=()=>{const t=te.dispatch;PS(),MS(),Tl(),t(Ge({key:"playVocal",value:""})),t(rt({component:"showTitle",visibility:!0})),Wf(te.getState().GUI.titleBg)},yxe="_GlobalDialog_main_101j8_2",_xe="_showGlobalDialog_101j8_1",xxe="_glabalDialog_container_inner_101j8_17",bxe="_glabalDialog_container_101j8_17",Sxe="_title_101j8_36",wxe="_button_list_101j8_41",Exe="_button_101j8_41",Uo={GlobalDialog_main:yxe,showGlobalDialog:_xe,glabalDialog_container_inner:xxe,glabalDialog_container:bxe,title:Sxe,button_list:wxe,button:Exe};function Txe(){const t=Ne(e=>e.GUI.showGlobalDialog);return C.jsx(C.Fragment,{children:t&&C.jsx("div",{id:"globalDialogContainer"})})}function as(t){const{playSeClick:e,playSeEnter:r}=cS();te.dispatch(rt({component:"showGlobalDialog",visibility:!0}));const n=()=>{e(),t.leftFunc(),AO()},i=()=>{e(),t.rightFunc(),AO()},a=C.jsx("div",{className:Uo.GlobalDialog_main,children:C.jsx("div",{className:Uo.glabalDialog_container,children:C.jsxs("div",{className:Uo.glabalDialog_container_inner,children:[C.jsx("div",{className:Uo.title,children:t.title}),C.jsxs("div",{className:Uo.button_list,children:[C.jsx("div",{className:Uo.button,onClick:n,onMouseEnter:r,children:t.leftText}),C.jsx("div",{className:Uo.button,onClick:i,onMouseEnter:r,children:t.rightText})]})]})})});setTimeout(()=>{ea.render(a,document.getElementById("globalDialogContainer"))},100)}function AO(){te.dispatch(rt({component:"showGlobalDialog",visibility:!1}))}function Axe(){te.dispatch(rt({component:"showControls",visibility:!0}))}function Cxe(){te.dispatch(rt({component:"showControls",visibility:!1}))}function Pxe(){te.getState().GUI.showControls===!0?Cxe():Axe()}const Oxe=()=>{const t=On("menu."),{playSeClick:e,playSeDialogOpen:r,playSePageChange:n}=_n(),i=Ne(v=>v.GUI),a=Lr(),o=i.currentMenuTag===vt.Save?` ${fl.MenuPanel_button_hl}`:"",s=i.currentMenuTag===vt.Load?` ${fl.MenuPanel_button_hl}`:"",u=i.currentMenuTag===vt.Option?` ${fl.MenuPanel_button_hl}`:"",l=i.currentMenuTag===vt.Save?"rgba(74, 34, 93, 0.9)":"rgba(123,144,169,1)",c=i.currentMenuTag===vt.Load?"rgba(11, 52, 110, 0.9)":"rgba(123,144,169,1)",f=i.currentMenuTag===vt.Option?"rgba(81, 110, 65, 0.9)":"rgba(123,144,169,1)",h=i.currentMenuTag===vt.Save?"rgba(74, 34, 93, 0.9)":"rgba(123,144,169,1)",d=i.currentMenuTag===vt.Load?"rgba(11, 52, 110, 0.9)":"rgba(123,144,169,1)",p=i.currentMenuTag===vt.Option?"rgba(81, 110, 65, 0.9)":"rgba(123,144,169,1)";return C.jsxs("div",{className:fl.MenuPanel_main,children:[C.jsx(qu,{iconName:"save",buttonOnClassName:o,iconColor:h,tagColor:l,clickFunc:()=>{n(),!i.showTitle&&a(ss(vt.Save))},tagName:t("saving.title")},"saveButton"),C.jsx(qu,{iconName:"load",buttonOnClassName:s,iconColor:d,tagColor:c,clickFunc:()=>{n(),a(ss(vt.Load))},tagName:t("loadSaving.title")},"loadButton"),C.jsx(qu,{iconName:"title",iconColor:"rgba(123,144,169,1)",tagColor:"rgba(123,144,169,1)",clickFunc:()=>{r(),as({title:t("$gaming.buttons.titleTips"),leftText:t("$common.yes"),rightText:t("$common.no"),leftFunc:()=>{NE(),a(rt({component:"showMenuPanel",visibility:!1}))},rightFunc:()=>{}})},tagName:t("title.title")},"titleIcon"),C.jsx(qu,{iconName:"option",style:{marginLeft:"auto"},buttonOnClassName:u,iconColor:p,tagColor:f,clickFunc:()=>{n(),a(ss(vt.Option))},tagName:t("options.title")},"optionButton"),C.jsx(qu,{iconName:"exit",iconColor:"rgba(123,144,169,1)",tagColor:"rgba(123,144,169,1)",clickFunc:()=>{e(),a(rt({component:"showMenuPanel",visibility:!1}))},tagName:t("exit.title")},"exitIcon")]})},Rxe="_Save_Load_main_a3o8b_2",Ixe="_Save_Load_top_a3o8b_9",kxe="_Elements_in_a3o8b_1",Mxe="_Save_Load_title_a3o8b_17",Fxe="_Save_title_text_a3o8b_35",Nxe="_Load_title_text_a3o8b_43",Lxe="_Save_Load_top_buttonList_a3o8b_51",Dxe="_Save_Load_top_button_a3o8b_51",Bxe="_Save_Load_top_button_text_a3o8b_69",jxe="_Save_Load_top_button_on_a3o8b_80",Uxe="_Load_top_button_on_a3o8b_93",$xe="_Load_top_button_a3o8b_93",Vxe="_Save_Load_content_a3o8b_106",Gxe="_Save_Load_content_element_a3o8b_115",Xxe="_Elements_in_transform_a3o8b_1",zxe="_Save_Load_content_element_top_a3o8b_131",Wxe="_Save_Load_content_element_top_index_a3o8b_138",Yxe="_Load_content_elememt_top_index_a3o8b_147",Hxe="_Save_Load_content_element_top_date_a3o8b_151",qxe="_Load_content_element_top_date_a3o8b_162",Kxe="_Save_Load_content_text_a3o8b_166",Zxe="_Save_Load_content_text_padding_a3o8b_180",Qxe="_Save_Load_content_speaker_a3o8b_184",Jxe="_Load_content_speaker_a3o8b_193",e1e="_Load_content_text_a3o8b_197",t1e="_Save_Load_content_miniRen_a3o8b_201",r1e="_Save_Load_content_miniRen_bg_a3o8b_208",n1e="_Save_Load_content_miniRen_figure_a3o8b_215",i1e="_Save_Load_content_miniRen_figLeft_a3o8b_223",a1e="_Save_Load_content_miniRen_figRight_a3o8b_228",Ue={Save_Load_main:Rxe,Save_Load_top:Ixe,Elements_in:kxe,Save_Load_title:Mxe,Save_title_text:Fxe,Load_title_text:Nxe,Save_Load_top_buttonList:Lxe,Save_Load_top_button:Dxe,Save_Load_top_button_text:Bxe,Save_Load_top_button_on:jxe,Load_top_button_on:Uxe,Load_top_button:$xe,Save_Load_content:Vxe,Save_Load_content_element:Gxe,Elements_in_transform:Xxe,Save_Load_content_element_top:zxe,Save_Load_content_element_top_index:Wxe,Load_content_elememt_top_index:Yxe,Save_Load_content_element_top_date:Hxe,Load_content_element_top_date:qxe,Save_Load_content_text:Kxe,Save_Load_content_text_padding:Zxe,Save_Load_content_speaker:Qxe,Load_content_speaker:Jxe,Load_content_text:e1e,Save_Load_content_miniRen:t1e,Save_Load_content_miniRen_bg:r1e,Save_Load_content_miniRen_figure:n1e,Save_Load_content_miniRen_figLeft:i1e,Save_Load_content_miniRen_figRight:a1e},o1e=()=>{const{playSePageChange:t,playSeEnter:e,playSeDialogOpen:r}=_n(),n=Ne(d=>d.userData),i=Ne(d=>d.saveData),a=Lr(),o=[];for(let d=1;d<=20;d++){let p=Ue.Save_Load_top_button;d===n.optionData.slPage&&(p=p+" "+Ue.Save_Load_top_button_on);const v=C.jsx("div",{onClick:()=>{a(zk(d)),st(),t()},onMouseEnter:e,className:p,children:C.jsx("div",{className:Ue.Save_Load_top_button_text,children:d})},"Save_element_page"+d);o.push(v)}const s=On("common."),u=[],l=(n.optionData.slPage-1)*10+1,c=l+9;ne.useEffect(()=>{Zv(l,c)},[l,c]);let f=0;for(let d=l;d<=c;d++){f++;const p=i.saveData[d];let v=C.jsx("div",{});if(p){const m=p.nowStageState.showName===""?" ":`${p.nowStageState.showName}`;v=C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:Ue.Save_Load_content_element_top,children:[C.jsx("div",{className:Ue.Save_Load_content_element_top_index,children:p.index}),C.jsx("div",{className:Ue.Save_Load_content_element_top_date,children:p.saveTime})]}),C.jsx("div",{className:Ue.Save_Load_content_miniRen,children:C.jsx("img",{className:Ue.Save_Load_content_miniRen_bg,alt:"Save_img_preview",src:p.previewImage})}),C.jsxs("div",{className:Ue.Save_Load_content_text,children:[C.jsx("div",{className:Ue.Save_Load_content_speaker,children:m}),C.jsx("div",{className:Ue.Save_Load_content_text_padding,children:p.nowStageState.showText})]})]})}const g=C.jsx("div",{onClick:()=>{i.saveData[d]?(r(),as({title:h("saving.isOverwrite"),leftText:s("yes"),rightText:s("no"),leftFunc:()=>{v_(d),st()},rightFunc:()=>{}})):(t(),v_(d))},onMouseEnter:e,className:Ue.Save_Load_content_element,style:{animationDelay:`${f*30}ms`},children:v},"saveElement_"+d);u.push(g)}const h=On("menu.");return C.jsxs("div",{className:Ue.Save_Load_main,children:[C.jsxs("div",{className:Ue.Save_Load_top,children:[C.jsx("div",{className:Ue.Save_Load_title,children:C.jsx("div",{className:Ue.Save_title_text,children:h("saving.title")})}),C.jsx("div",{className:Ue.Save_Load_top_buttonList,children:o})]}),C.jsx("div",{className:Ue.Save_Load_content,id:"Save_content_page_"+n.optionData.slPage,children:u})]})},s1e=()=>{const{playSeClick:t,playSeEnter:e,playSePageChange:r}=_n(),n=Ne(h=>h.userData),i=Ne(h=>h.saveData),a=Lr(),o=[];for(let h=1;h<=20;h++){let d=Ue.Save_Load_top_button+" "+Ue.Load_top_button;h===n.optionData.slPage&&(d=d+" "+Ue.Save_Load_top_button_on+" "+Ue.Load_top_button_on);const p=C.jsx("div",{onClick:()=>{a(zk(h)),st(),r()},onMouseEnter:e,className:d,children:C.jsx("div",{className:Ue.Save_Load_top_button_text,children:h})},"Load_element_page"+h);o.push(p)}const s=[],u=(n.optionData.slPage-1)*10+1,l=u+9;ne.useEffect(()=>{Zv(u,l)},[u,l]);let c=0;for(let h=u;h<=l;h++){c++;const d=i.saveData[h];let p=C.jsx("div",{});if(d){const g=d.nowStageState.showName===""?" ":`${d.nowStageState.showName}`;p=C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:Ue.Save_Load_content_element_top,children:[C.jsx("div",{className:Ue.Save_Load_content_element_top_index+" "+Ue.Load_content_elememt_top_index,children:d.index}),C.jsx("div",{className:Ue.Save_Load_content_element_top_date+" "+Ue.Load_content_element_top_date,children:d.saveTime})]}),C.jsx("div",{className:Ue.Save_Load_content_miniRen,children:C.jsx("img",{className:Ue.Save_Load_content_miniRen_bg,alt:"Save_img_preview",src:d.previewImage})}),C.jsxs("div",{className:Ue.Save_Load_content_text,children:[C.jsx("div",{className:Ue.Save_Load_content_speaker+" "+Ue.Load_content_speaker,children:g}),C.jsx("div",{className:Ue.Save_Load_content_text_padding,children:d.nowStageState.showText})]})]})}const v=C.jsx("div",{onClick:()=>{hN(h),t()},onMouseEnter:e,className:Ue.Save_Load_content_element,style:{animationDelay:`${c*30}ms`},children:p},"loadElement_"+h);s.push(v)}const f=On("menu.");return C.jsxs("div",{className:Ue.Save_Load_main,children:[C.jsxs("div",{className:Ue.Save_Load_top,children:[C.jsx("div",{className:Ue.Save_Load_title,children:C.jsx("div",{className:Ue.Load_title_text,children:f("loadSaving.title")})}),C.jsx("div",{className:Ue.Save_Load_top_buttonList,children:o})]}),C.jsx("div",{className:Ue.Save_Load_content,id:"Load_content_page_"+n.optionData.slPage,children:s})]})},l1e="_Options_main_u5orq_2",u1e="_Options_top_u5orq_9",c1e="_Options_title_u5orq_16",f1e="_Option_title_text_u5orq_25",h1e="_Elements_in_u5orq_1",d1e="_Option_title_text_shadow_u5orq_34",p1e="_Option_title_text_ts_u5orq_41",v1e="_Options_main_content_u5orq_48",m1e="_Options_main_content_half_u5orq_55",g1e="_About_title_text_u5orq_65",y1e="_About_text_u5orq_73",_1e="_Options_page_container_u5orq_92",x1e="_Options_button_list_u5orq_98",b1e="_Options_page_button_u5orq_102",S1e="_Options_page_button_active_u5orq_114",un={Options_main:l1e,Options_top:u1e,Options_title:c1e,Option_title_text:f1e,Elements_in:h1e,Option_title_text_shadow:d1e,Option_title_text_ts:p1e,Options_main_content:v1e,Options_main_content_half:m1e,About_title_text:g1e,About_text:y1e,Options_page_container:_1e,Options_button_list:x1e,Options_page_button:b1e,Options_page_button_active:S1e},w1e="_NormalOption_ogzuv_1",E1e="_Elements_in_ogzuv_1",T1e="_NormalOption_title_ogzuv_10",A1e="_NormalOption_title_bef_ogzuv_19",C1e="_NormalOption_title_sd_ogzuv_29",P1e="_NormalOption_buttonList_ogzuv_39",Wy={NormalOption:w1e,Elements_in:E1e,NormalOption_title:T1e,NormalOption_title_bef:A1e,NormalOption_title_sd:C1e,NormalOption_buttonList:P1e},Kr=t=>C.jsxs("div",{className:Wy.NormalOption,style:{width:t.full?"100%":"auto"},children:[C.jsx("div",{className:Wy.NormalOption_title,children:t.title}),C.jsx("div",{className:Wy.NormalOption_buttonList,style:{width:t.full?"100%":"auto"},children:t.children})]}),O1e="_NormalButton_1qk3b_1",R1e="_NormalButtonChecked_1qk3b_18",Yy={NormalButton:O1e,NormalButtonChecked:R1e},Ia=t=>{const e=t.textList.length,r=[],{playSeEnter:n,playSeSwitch:i}=_n();for(let a=0;a{i(),t.functionList[a]()},onMouseEnter:n,children:t.textList[a]},t.textList[a]+a+t);r.push(o)}else{const o=C.jsx("div",{className:Yy.NormalButton,onClick:()=>{i(),t.functionList[a]()},onMouseEnter:n,children:t.textList[a]},t.textList[a]+a);r.push(o)}return C.jsx(C.Fragment,{children:r})};function I1e(t){return Is[t]}function sB(){const{i18n:t}=Qv(),e=du(n=>n.userData),r=Lr();return(n,i=!0)=>{var s;const a=n??((s=e.current)==null?void 0:s.optionData.language)??Is.zhCn,o=I1e(a);t.changeLanguage(o),r(Ct({key:"language",value:a})),ge.info("设置语言: "+o),window==null||window.localStorage.setItem("lang",a.toString()),i&&st()}}const k1e="_backButton_qbk37_1",M1e="_about_qbk37_16",F1e="_icon_qbk37_20",N1e="_title_qbk37_24",L1e="_text_qbk37_34",D1e="_contributor_qbk37_43",Wn={backButton:k1e,about:M1e,icon:F1e,title:N1e,text:L1e,contributor:D1e};function B1e(t){const e=On("menu.options.pages.system.options.about.");return C.jsxs("div",{className:Wn.about,children:[C.jsx("div",{className:Wn.backButton,onClick:t.onClose,children:C.jsx(oxe,{className:Wn.icon,theme:"outline",size:"35",strokeWidth:3,fill:"#333"})}),C.jsx("div",{className:Wn.title,children:e("subTitle")}),C.jsx("div",{className:Wn.title,children:e("version")}),C.jsx("div",{className:Wn.text,children:J3.version}),C.jsx("div",{className:Wn.title,children:e("source")}),C.jsx("div",{className:Wn.text,children:C.jsx("a",{target:"_blank",href:"https://github.com/OpenWebGAL/WebGAL",children:"https://github.com/OpenWebGAL/WebGAL"})}),C.jsx("div",{className:Wn.title,children:e("contributors")}),C.jsx("div",{className:Wn.text,children:C.jsx("a",{target:"_blank",href:"https://github.com/OpenWebGAL/WebGAL/graphs/contributors",children:"https://github.com/OpenWebGAL/WebGAL/graphs/contributors"})}),C.jsx("div",{className:Wn.title,children:e("website")}),C.jsx("div",{className:Wn.text,children:C.jsx("a",{target:"_blank",href:"https://openwebgal.com/",children:"https://openwebgal.com/"})})]})}function j1e(){const t=Ne(h=>h.userData),e=Ne(h=>h.saveData),r=Lr(),n=sB(),i=On("menu.options.pages.system.options."),{playSeDialogOpen:a}=_n();function o(){const d=JSON.stringify({userData:t,saves:e});if(d!==null){const p=new Blob([d],{type:"application/json"}),v=URL.createObjectURL(p),g=document.createElement("a");g.href=v,g.download="saves.json",g.click(),g.remove()}}function s(h){const d=h.target.files[0],p=new FileReader;p.onload=v=>{const g=v.target.result;try{const m=JSON.parse(g);a(),as({title:i("gameSave.dialogs.import.title"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:async()=>{await Os.setItem(L.gameKey,m.userData).then(()=>{ge.info(i("gameSave.dialogs.import.tip"))}),Jc(),te.dispatch(Oa.replaceSaveGame(m.saves.saveData)),te.dispatch(Oa.setFastSave(m.saves.quickSaveData)),_d(),yd(0,200)},rightFunc:()=>{}})}catch(m){ge.error(i("gameSave.dialogs.import.error"),m)}},p.readAsText(d,"UTF-8")}function u(){const h=document.createElement("input");h.type="file",h.onchange=s,h.click()}const[l,c]=ne.useState(!1);function f(){c(!l)}return C.jsxs("div",{className:un.Options_main_content_half,children:[l&&C.jsx(B1e,{onClose:f}),!l&&C.jsxs(C.Fragment,{children:[C.jsx(Kr,{title:i("autoSpeed.title"),children:C.jsx(Ia,{textList:i("autoSpeed.options.slow","autoSpeed.options.medium","autoSpeed.options.fast"),functionList:[()=>{r(Ct({key:"autoSpeed",value:hn.slow})),st()},()=>{r(Ct({key:"autoSpeed",value:hn.normal})),st()},()=>{r(Ct({key:"autoSpeed",value:hn.fast})),st()}],currentChecked:t.optionData.autoSpeed})},"option1"),C.jsx(Kr,{title:i("language.title"),children:C.jsx(Ia,{currentChecked:t.optionData.language,textList:Object.values(ip),functionList:Object.keys(ip).map(h=>()=>n(Is[h]))})},"option7"),C.jsx(Kr,{title:i("resetData.title"),children:C.jsx(Ia,{textList:i("resetData.options.clearGameSave","resetData.options.resetSettings","resetData.options.clearAll"),functionList:[()=>{a(),as({title:i("resetData.dialogs.clearGameSave"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(Oa.resetSaves()),yd(0,200),_d()},rightFunc:()=>{}})},()=>{a(),as({title:i("resetData.dialogs.resetSettings"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(cW()),hp()},rightFunc:()=>{}})},()=>{a(),as({title:i("resetData.dialogs.clearAll"),leftText:i("$common.yes"),rightText:i("$common.no"),leftFunc:()=>{r(fW()),hp(),r(Oa.resetSaves()),yd(0,200),_d()},rightFunc:()=>{}})}],currentChecked:3})},"option2"),C.jsx(Kr,{title:i("gameSave.title"),children:C.jsx(Ia,{textList:i("gameSave.options.export","gameSave.options.import"),functionList:[o,u],currentChecked:2})},"option3"),C.jsx("div",{className:un.About_title_text,onClick:f,children:C.jsx("span",{className:un.About_text,children:i("about.title")})})]})]})}const U1e="_textPreviewMain_nolr3_1",$1e="_textbox_nolr3_8",CO={textPreviewMain:U1e,textbox:$1e},V1e=t=>{const e=On("menu.options.pages.display.options."),r=Ne(x=>x.userData),i=Ne(x=>x.stage).bgName,a=yS(r.optionData.textSpeed),o=FF(r.optionData.textSpeed),s=r.optionData.textboxOpacity,u=f_(r.optionData.textSize)+"%",l=NF(),c=navigator.userAgent,f=/firefox/i.test(c),h=/^((?!chrome|android).)*safari/i.test(c),d=e("textPreview.text"),p=gs(d,3),v=e("textPreview.title"),g=gs(v,3),m=v!=="",y=LF,_={textArray:p,isText:!0,textDelay:a,isHasName:m,showName:g,currentConcatDialogPrev:"",fontSize:u,currentDialogKey:"",isSafari:h,isFirefox:f,miniAvatar:"",textDuration:o,font:l,textSizeState:u,lineLimit:3,isUseStroke:!0,textboxOpacity:s};return C.jsx("div",{className:CO.textPreviewMain,style:{background:i?`bottom / cover no-repeat url(${i})`:"rgba(0, 0, 0, 0.1)"},children:C.jsx("div",{className:CO.textbox,children:C.jsx(y,{..._})},`previewTextbox-${a}`)})};const el=t=>{const{playSeEnter:e}=_n();return ne.useEffect(()=>{setTimeout(()=>{const r=document.getElementById(t.uniqueID);r!==null&&r.setAttribute("value",t.initValue.toString())},1)},[]),C.jsx("div",{className:"Option_WebGAL_slider",children:C.jsx("input",{id:t.uniqueID,type:"range",onChange:t.onChange,onFocus:e,onMouseEnter:e})})};function G1e(){const t=Ne(n=>n.userData),e=Lr(),r=On("menu.options.pages.display.options.");return C.jsxs("div",{className:un.Options_main_content_half,children:[C.jsx(Kr,{title:r("fullScreen.title"),children:C.jsx(Ia,{textList:r("fullScreen.options.on","fullScreen.options.off"),functionList:[()=>{e(Ct({key:"fullScreen",value:Qi.on})),st()},()=>{e(Ct({key:"fullScreen",value:Qi.off})),st()}],currentChecked:t.optionData.fullScreen})},"fullScreen"),C.jsx(Kr,{title:r("textSpeed.title"),children:C.jsx(Ia,{textList:r("textSpeed.options.slow","textSpeed.options.medium","textSpeed.options.fast"),functionList:[()=>{e(Ct({key:"textSpeed",value:hn.slow})),st()},()=>{e(Ct({key:"textSpeed",value:hn.normal})),st()},()=>{e(Ct({key:"textSpeed",value:hn.fast})),st()}],currentChecked:t.optionData.textSpeed})},"textSpeed"),C.jsx(Kr,{title:r("textSize.title"),children:C.jsx(Ia,{textList:r("textSize.options.small","textSize.options.medium","textSize.options.large"),functionList:[()=>{e(Ct({key:"textSize",value:ti.small})),st()},()=>{e(Ct({key:"textSize",value:ti.medium})),st()},()=>{e(Ct({key:"textSize",value:ti.large})),st()}],currentChecked:t.optionData.textSize})},"textSize"),C.jsx(Kr,{title:r("textFont.title"),children:C.jsx(Ia,{textList:r("textFont.options.siYuanSimSun","textFont.options.SimHei","textFont.options.lxgw"),functionList:[()=>{e(Ct({key:"textboxFont",value:Zi.song})),st()},()=>{e(Ct({key:"textboxFont",value:Zi.hei})),st()},()=>{e(Ct({key:"textboxFont",value:Zi.lxgw})),st()}],currentChecked:t.optionData.textboxFont})},"textFont"),C.jsx(Kr,{title:r("textboxOpacity.title"),children:C.jsx(el,{initValue:t.optionData.textboxOpacity,uniqueID:r("textboxOpacity.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"textboxOpacity",value:Number(i)})),st()}})},"textboxOpacity"),C.jsx(Kr,{full:!0,title:r("textPreview.title"),children:C.jsx(V1e,{})},"textPreview")]})}function X1e(){const t=Ne(n=>n.userData),e=Lr(),r=On("menu.options.pages.sound.options.");return C.jsxs("div",{className:un.Options_main_content_half,children:[C.jsx(Kr,{title:r("volumeMain.title"),children:C.jsx(el,{initValue:t.optionData.volumeMain,uniqueID:r("volumeMain.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"volumeMain",value:Number(i)})),st()}})},"option4"),C.jsx(Kr,{title:r("vocalVolume.title"),children:C.jsx(el,{initValue:t.optionData.vocalVolume,uniqueID:r("vocalVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"vocalVolume",value:Number(i)})),st()}})},"option5"),C.jsx(Kr,{title:r("bgmVolume.title"),children:C.jsx(el,{initValue:t.optionData.bgmVolume,uniqueID:r("bgmVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"bgmVolume",value:Number(i)})),st()}})},"option6"),C.jsx(Kr,{title:r("seVolume.title"),children:C.jsx(el,{initValue:t.optionData.seVolume,uniqueID:r("seVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"seVolume",value:Number(i)})),st()}})},"option7"),C.jsx(Kr,{title:r("uiSeVolume.title"),children:C.jsx(el,{initValue:t.optionData.uiSeVolume,uniqueID:r("uiSeVolume.title"),onChange:n=>{const i=n.target.value;e(Ct({key:"uiSeVolume",value:Number(i)})),st()}})},"option8"),C.jsx(Kr,{title:r("voiceOption.title"),children:C.jsx(Ia,{textList:r("voiceStop.title","voiceContinue.title"),functionList:[()=>{e(Ct({key:"voiceInterruption",value:zc.yes})),st()},()=>{e(Ct({key:"voiceInterruption",value:zc.no})),st()}],currentChecked:t.optionData.voiceInterruption})},"option9")]})}const z1e=()=>{const{playSeEnter:t,playSeSwitch:e}=_n(),r=wi(0);ne.useEffect(Jc,[]);function n(a){return a===r.value?un.Options_page_button+" "+un.Options_page_button_active:un.Options_page_button}const i=On("menu.options.");return C.jsxs("div",{className:un.Options_main,children:[C.jsx("div",{className:un.Options_top,children:C.jsx("div",{className:un.Options_title,children:C.jsx("div",{className:un.Option_title_text,children:i("title")})})}),C.jsxs("div",{className:un.Options_page_container,children:[C.jsxs("div",{className:un.Options_button_list,children:[C.jsx("div",{onClick:()=>{r.set(0),e()},className:n(0),onMouseEnter:t,children:i("pages.system.title")}),C.jsx("div",{onClick:()=>{r.set(1),e()},className:n(1),onMouseEnter:t,children:i("pages.display.title")}),C.jsx("div",{onClick:()=>{r.set(2),e()},className:n(2),onMouseEnter:t,children:i("pages.sound.title")})]}),C.jsxs("div",{className:un.Options_main_content,children:[r.value===1&&C.jsx(G1e,{}),r.value===0&&C.jsx(j1e,{}),r.value===2&&C.jsx(X1e,{})]})]})]})},W1e=()=>{const t=Ne(r=>r.GUI);let e;switch(t.currentMenuTag){case vt.Save:e=C.jsx(o1e,{});break;case vt.Load:e=C.jsx(s1e,{});break;case vt.Option:e=C.jsx(z1e,{});break}return C.jsx(C.Fragment,{children:t.showMenuPanel&&C.jsxs("div",{className:wO.Menu_main,children:[C.jsx("div",{className:wO.Menu_TagContent,children:e}),C.jsx(Oxe,{})]})})},Y1e="_MainStage_main_9enex_1",H1e="_MainStage_main_container_9enex_10",q1e="_MainStage_bgContainer_9enex_17",K1e="_MainStage_showBgSoftly_9enex_1",Z1e="_MainStage_bgContainer_Settled_9enex_27",Q1e="_MainStage_oldBgContainer_9enex_37",J1e="_MainStage_oldBgFadeout_9enex_1",ebe="_MainStage_oldBgContainer_Settled_9enex_47",tbe="_pixiContainer_9enex_72",rbe="_chooseContainer_9enex_77",Hy={MainStage_main:Y1e,MainStage_main_container:H1e,MainStage_bgContainer:q1e,MainStage_showBgSoftly:K1e,MainStage_bgContainer_Settled:Z1e,MainStage_oldBgContainer:Q1e,MainStage_oldBgFadeout:J1e,MainStage_oldBgContainer_Settled:ebe,pixiContainer:tbe,chooseContainer:rbe},nbe=()=>{var v;const t=Ne(g=>g.stage),e=Ne(g=>g.GUI.titleBgm),r=Ne(g=>g.GUI.showTitle),n=Ne(g=>g.userData),i=n.optionData.volumeMain,a=i*.01*n.optionData.vocalVolume*.01*t.vocalVolume*.01,o=i*.01*n.optionData.bgmVolume*.01*t.bgm.volume*.01,s=t.bgm.enter,u=t.uiSe,l=i*.01*(((v=n.optionData)==null?void 0:v.seVolume)??100)*.01,c=i*.01*(n.optionData.uiSeVolume??50)*.01,f=Ne(g=>g.GUI.isEnterGame),[h,d]=ne.useState(setTimeout(()=>{},0)),p=(g,m,y)=>{y>=0?g.volume=0:g.volume=m;const _=10,x=m/y*_,b=()=>{const S=setTimeout(()=>{g.volume+x>=m?g.volume=m:g.volume+x<=0?(g.volume=0,te.dispatch(Ge({key:"bgm",value:{src:"",enter:0,volume:100}}))):(g.volume+=x,b())},_);d(S)};b()};return ne.useEffect(()=>{clearTimeout(h);const g=document.getElementById("currentBgm");g&&(s===0?g.volume=o:p(g,o,s))},[r,e,t.bgm.src,o,s]),ne.useEffect(()=>{ge.debug(`设置背景音量:${o}`)},[o]),ne.useEffect(()=>{ge.debug(`设置背景音量淡入时间: ${s}`)},[s]),ne.useEffect(()=>{ge.debug(`设置语音音量:${a}`);const g=document.getElementById("currentVocal");g&&(g.volume=a.toString())},[a]),ne.useEffect(()=>{if(u==="")return;const g=document.createElement("audio");g.src=u,g.loop=!1,isNaN(c)?(ge.error("UI SE Vol is NaN"),g.volume=isNaN(l)?i/100:l/100):g.volume=c,g.play(),g.addEventListener("ended",()=>{g.remove()}),te.dispatch(Ge({key:"uiSe",value:""}))},[u]),ne.useEffect(()=>{ge.debug(`设置音效音量: ${l}`)},[l]),ne.useEffect(()=>{ge.debug(`设置用户界面音效音量: ${c}`)},[c]),C.jsxs("div",{children:[C.jsx("audio",{id:"currentBgm",src:r?e:t.bgm.src,loop:!0,autoPlay:f},r.toString()+e),C.jsx("audio",{id:"currentVocal",src:t.playVocal})]})},ibe=()=>{const t=Ne(i=>i.stage);let e="100%",r="100%",n="0";return t.enableFilm!==""&&(r="76%",n="12%"),C.jsx("div",{className:Bi.FullScreenPerform_main,style:{width:e,height:r,top:n},children:C.jsx("div",{id:"videoContainer"})})},abe="_TextBox_EventHandler_449dq_2",obe="_TextBox_main_449dq_10",sbe="_showSoftly_449dq_1",lbe="_TextBox_textElement_449dq_38",ube="_TextBox_textElement_start_449dq_43",cbe="_TextDelayShow_449dq_1",fbe="_TextBox_textElement_Settled_449dq_48",hbe="_TextBox_showName_449dq_52",dbe="_miniAvatarContainer_449dq_68",pbe="_miniAvatarImg_449dq_76",qy={TextBox_EventHandler:abe,TextBox_main:obe,showSoftly:sbe,TextBox_textElement:lbe,TextBox_textElement_start:ube,TextDelayShow:cbe,TextBox_textElement_Settled:fbe,TextBox_showName:hbe,miniAvatarContainer:dbe,miniAvatarImg:pbe},vbe=()=>{const t=Ne(o=>o.stage),e=Ne(o=>o.userData);ne.useEffect(()=>{});const r=dW.textInitialDelay-20*e.optionData.textSpeed,n=e.optionData.textSize*50+200+"%",a=t.showText.split("").map((o,s)=>{let u=s*r,l=t.currentConcatDialogPrev.length;return t.currentConcatDialogPrev!==""&&s>=l&&(u=u-l*r),s{var n,i;const r="bg-main";if(e!==""){const a=(n=L.gameplay.pixiStage)==null?void 0:n.getStageObjByKey(r);a&&a.sourceUrl!==e&&PO(a),gbe(void 0,r,e),Wf(e),ge.debug("重设背景");const{duration:o,animation:s}=Ka("bg-main","enter",!0);L.gameplay.pixiStage.registerPresetAnimation(s,"bg-main-softin",r,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects("bg-main-softin"),o)}else{const a=(i=L.gameplay.pixiStage)==null?void 0:i.getStageObjByKey(r);a&&PO(a)}},[e])}function PO(t){var o,s;(o=L.gameplay.pixiStage)==null||o.removeAnimationWithSetEffects("bg-main-softin");const e=t.key;t.key="bg-main-off"+String(new Date().getTime());const r=t.key,n=t.key+"-softoff";(s=L.gameplay.pixiStage)==null||s.removeStageObjectByKey(e);const{duration:i,animation:a}=Ka("bg-main-off","exit",!0,r);L.gameplay.pixiStage.registerAnimation(a,n,r),setTimeout(()=>{var u,l;(u=L.gameplay.pixiStage)==null||u.removeAnimation(n),(l=L.gameplay.pixiStage)==null||l.removeStageObjectByKey(r)},i)}function gbe(t,...e){var n,i;return e[1].endsWith(".skel")?(n=L.gameplay.pixiStage)==null?void 0:n.addSpineBg(...e):(i=L.gameplay.pixiStage)==null?void 0:i.addBg(...e)}function ybe(t){const{figNameLeft:e,figName:r,figNameRight:n,freeFigure:i,live2dMotion:a,live2dExpression:o}=t;ne.useEffect(()=>{var s;for(const u of a)(s=L.gameplay.pixiStage)==null||s.changeModelMotionByKey(u.target,u.motion)},[a]),ne.useEffect(()=>{var s;for(const u of o)(s=L.gameplay.pixiStage)==null||s.changeModelExpressionByKey(u.target,u.expression)},[o]),ne.useEffect(()=>{var l,c;const s="fig-center",u="fig-center-softin";if(r!==""){const f=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==r&&ba(f,u,t.effects),Ku(void 0,s,r,"center"),ge.debug("中立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");L.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{ge.debug("移除中立绘");const f=(c=L.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==r&&ba(f,u,t.effects)}},[r]),ne.useEffect(()=>{var l,c;const s="fig-left",u="fig-left-softin";if(e!==""){const f=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==e&&ba(f,u,t.effects),Ku(void 0,s,e,"left"),ge.debug("左立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");L.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{ge.debug("移除左立绘");const f=(c=L.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==e&&ba(f,u,t.effects)}},[e]),ne.useEffect(()=>{var l,c;const s="fig-right",u="fig-right-softin";if(n!==""){const f=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(s);f&&f.sourceUrl!==n&&ba(f,u,t.effects),Ku(void 0,s,n,"right"),ge.debug("右立绘已重设");const{duration:h,animation:d}=Ka(s,"enter");L.gameplay.pixiStage.registerPresetAnimation(d,u,s,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(u),h)}else{const f=(c=L.gameplay.pixiStage)==null?void 0:c.getStageObjByKey(s);f&&f.sourceUrl!==n&&ba(f,u,t.effects)}},[n]),ne.useEffect(()=>{var u,l,c;for(const f of i){const h=`${f.key}`,d=`${f.key}-softin`;if(f.name!==""){const p=(u=L.gameplay.pixiStage)==null?void 0:u.getStageObjByKey(h);if(p){if(p.sourceUrl!==f.name){ba(p,d,t.effects),Ku(void 0,h,f.name,f.basePosition),ge.debug(`${f.key}立绘已重设`);const{duration:v,animation:g}=Ka(h,"enter");L.gameplay.pixiStage.registerPresetAnimation(g,d,h,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(d),v)}}else{Ku(void 0,h,f.name,f.basePosition),ge.debug(`${f.key}立绘已重设`);const{duration:v,animation:g}=Ka(h,"enter");L.gameplay.pixiStage.registerPresetAnimation(g,d,h,t.effects),setTimeout(()=>L.gameplay.pixiStage.removeAnimationWithSetEffects(d),v)}}else{const p=(l=L.gameplay.pixiStage)==null?void 0:l.getStageObjByKey(h);p&&p.sourceUrl!==f.name&&ba(p,d,t.effects)}}const s=(c=L.gameplay.pixiStage)==null?void 0:c.getFigureObjects();if(s){for(const f of s)if(!(f.key==="fig-left"||f.key==="fig-center"||f.key==="fig-right"||f.key.endsWith("-off"))){const h=f.key;if(i.findIndex(p=>p.key===h)<0){const p=`${f.key}-softin`;ba(f,p,t.effects)}}}},[i])}function ba(t,e,r){var l,c,f;if((l=L.gameplay.pixiStage)==null||l.removeAnimationWithSetEffects(e),L.gameplay.isFast){ge.debug("快速模式,立刻关闭立绘"),(c=L.gameplay.pixiStage)==null||c.removeStageObjectByKey(t.key);return}const n=t.key,i=n+"-off";t.key=n+String(new Date().getTime())+"-off";const a=t.key;(f=L.gameplay.pixiStage)==null||f.removeStageObjectByKey(n);const o=a+"-softoff",{duration:s,animation:u}=Ka(i,"exit",!1,a);L.gameplay.pixiStage.registerPresetAnimation(u,o,a,r),setTimeout(()=>{var h,d;(h=L.gameplay.pixiStage)==null||h.removeAnimation(o),(d=L.gameplay.pixiStage)==null||d.removeStageObjectByKey(a)},s)}function Ku(t,...e){var n,i;const r=e[1];return r.endsWith(".json")?_be(...e):r.endsWith(".skel")?(n=L.gameplay.pixiStage)==null?void 0:n.addSpineFigure(...e):(i=L.gameplay.pixiStage)==null?void 0:i.addFigure(...e)}function _be(...t){}function xbe(t){const e=t.effects;setTimeout(()=>{bbe(e)},10)}function bbe(t){var r,n,i,a;const e=((r=L.gameplay.pixiStage)==null?void 0:r.getAllStageObj())??[];for(const o of e){const s=o.key,u=t.find(c=>c.target===s);if(!(((n=L.gameplay.pixiStage)==null?void 0:n.getAllLockedObject())??[]).includes(s))if(u){const c=(i=L.gameplay.pixiStage)==null?void 0:i.getStageObjByKey(s);if(c){const f=c.pixiContainer;Object.assign(f,OO(u.transform))}}else{const c=(a=L.gameplay.pixiStage)==null?void 0:a.getStageObjByKey(s);if(c){const f=c.pixiContainer;Object.assign(f,OO(Zb))}}}}function OO(t){if(!t)return{};const{position:e,alpha:r,...n}=t;return{...n,x:e.x,y:e.y,alphaFilterVal:r}}function Sbe(){const t=Ne(e=>e.stage);return mbe(t),ybe(t),xbe(t),C.jsx("div",{style:{display:"none"}})}const wbe="_introContainer_119k8_1",Ebe={introContainer:wbe};function Tbe(){return C.jsx("div",{className:Ebe.introContainer,id:"introContainer"})}function RO(t){const e=document.getElementById("textBoxMain");if(!e)return!1;let r=e.getBoundingClientRect();return t.clientX>r.left&&t.clientXr.top&&t.clientY{n(rt({component:"controlsVisibility",visibility:!1}))},1e3)):Abe(t,r,n)}const Obe=()=>{const t=Ne(n=>n.stage),e=Ne(n=>n.GUI),r=Lr();return Vse(),C.jsxs("div",{className:Hy.MainStage_main,children:[C.jsx(ibe,{}),C.jsx(Sbe,{}),C.jsx("div",{id:"pixiContianer",className:Hy.pixiContainer,style:{zIndex:FE?"-5":void 0}}),C.jsx("div",{id:"chooseContainer",className:Hy.chooseContainer}),e.showTextBox&&t.enableFilm===""&&!t.isDisableTextbox&&C.jsx(lae,{}),e.showTextBox&&t.enableFilm!==""&&C.jsx(vbe,{}),C.jsx(nbe,{}),C.jsx("div",{onClick:()=>{if(!e.showTextBox){r(rt({component:"showTextBox",visibility:!0}));return}FS(),tn()},onDoubleClick:()=>{L.events.fullscreenDbClick.emit()},id:"FullScreenClick",style:{width:"100%",height:"100%",position:"absolute",zIndex:"12",top:"0"},onMouseMove:n=>!e.showControls&&Pbe(n,t,e,r)}),C.jsx(Tbe,{})]})},Rbe=()=>{const t=On("gaming."),e=2.5,{i18n:r}=Qv(),{playSeEnter:n,playSeClick:i,playSeDialogOpen:a}=_n(),s=r.language==="fr";let u=42,l="150%";s&&(l="125%",u=40);const c=Ne(m=>m.GUI),f=Ne(m=>m.stage),h=Lr(),d=(m,y)=>{h(rt({component:m,visibility:y}))},p=m=>{h(ss(m))},v=Ne(m=>m.saveData.saveData);let g=C.jsx("div",{style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:C.jsx("div",{style:{fontSize:"125%"},children:t("noSaving")})});if(v[0]){const m=v[0];g=C.jsxs("div",{className:Ie.slPreviewMain,children:[C.jsx("div",{className:Ie.imgContainer,children:C.jsx("img",{style:{height:"100%"},alt:"q-save-preview image",src:m.previewImage})}),C.jsxs("div",{className:Ie.textContainer,children:[C.jsx("div",{children:m.nowStageState.showName}),C.jsx("div",{style:{fontSize:"75%",color:"rgb(55,60,56)"},children:m.nowStageState.showText})]})]})}return C.jsx(C.Fragment,{children:c.showTextBox&&f.enableFilm===""&&C.jsxs("div",{className:Ie.main,style:{visibility:c.controlsVisibility?"visible":"hidden"},children:[c.showTextBox&&C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{d("showTextBox",!1),i()},onMouseEnter:n,children:[C.jsx(cxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.hide")})]}),!c.showTextBox&&C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{d("showTextBox",!0),i()},onMouseEnter:n,children:[C.jsx(fxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.show")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{d("showBacklog",!0),d("showTextBox",!1),i()},onMouseEnter:n,children:[C.jsx(J_e,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.backlog")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{let m=document.getElementById("currentVocal");m!==null&&(m.currentTime=0,m.pause(),m==null||m.play()),i()},onMouseEnter:n,children:[C.jsx(hxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.replay")})]}),C.jsxs("span",{id:"Button_ControlPanel_auto",className:Ie.singleButton,style:{fontSize:l},onClick:()=>{TN(),i()},onMouseEnter:n,children:[C.jsx(iB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.auto")})]}),C.jsxs("span",{id:"Button_ControlPanel_fast",className:Ie.singleButton,style:{fontSize:l},onClick:()=>{ON(),i()},onMouseEnter:n,children:[C.jsx(txe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.forward")})]}),C.jsxs("span",{className:Ie.singleButton+" "+Ie.fastsave,style:{fontSize:l},onClick:()=>{v_(0),i()},onMouseEnter:n,children:[C.jsx(exe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.quicklySave")}),C.jsx("div",{className:Ie.fastSlPreview+" "+Ie.fastSPreview,children:g})]}),C.jsxs("span",{className:Ie.singleButton+" "+Ie.fastload,style:{fontSize:l},onClick:()=>{hN(0),i()},onMouseEnter:n,children:[C.jsx(rxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.quicklyLoad")}),C.jsx("div",{className:Ie.fastSlPreview+" "+Ie.fastLPreview,children:g})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{p(vt.Save),d("showMenuPanel",!0),i()},onMouseEnter:n,children:[C.jsx(aB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.save")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{p(vt.Load),d("showMenuPanel",!0),i()},onMouseEnter:n,children:[C.jsx(rB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.load")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{p(vt.Option),d("showMenuPanel",!0),i()},onMouseEnter:n,children:[C.jsx(oB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.options")})]}),C.jsxs("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{a(),as({title:t("buttons.titleTips"),leftText:t("$common.yes"),rightText:t("$common.no"),leftFunc:()=>{NE()},rightFunc:()=>{}})},onMouseEnter:n,children:[C.jsx(nB,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}),C.jsx("span",{className:Ie.button_text,children:t("buttons.title")})]}),C.jsx("span",{className:Ie.singleButton,style:{fontSize:l},onClick:()=>{Pxe(),i()},onMouseEnter:n,children:c.showControls?C.jsx(sxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e}):C.jsx(vxe,{className:Ie.button,theme:"outline",size:u,fill:"#f5f5f7",strokeWidth:e})})]})})},Ibe=()=>{var h,d;const t=On("gaming."),{playSeEnter:e,playSeClick:r}=_n(),n=Ne(p=>p.GUI),i=Lr(),a="0.8em",[o,s]=ne.useState(!1),[u,l]=ne.useState(!1);let c=ne.useRef();const f=ne.useMemo(()=>{let p=[];for(let v=0;vA.map(O=>O.reactNode)),x=IO(y).map((A,O)=>C.jsx("div",{children:A.map((P,k)=>P==="
"?C.jsx("br",{},`br${k}`):P)},`backlog-line-${O}`)),S=gs(g.currentStageState.showName,3,!0).map(A=>A.map(O=>O.reactNode)),E=IO(S).map((A,O)=>C.jsx("div",{children:A.map((P,k)=>P==="
"?C.jsx("br",{},`br${k}`):P)},`backlog-line-${O}`)),T=C.jsxs("div",{className:Ur.backlog_item,style:{animationDelay:`${20*(L.backlogManager.getBacklog().length-v)}ms`},children:[C.jsxs("div",{className:Ur.backlog_func_area,children:[C.jsxs("div",{className:Ur.backlog_item_button_list,children:[C.jsx("div",{onClick:A=>{r(),fN(v),A.preventDefault(),A.stopPropagation()},onMouseEnter:e,className:Ur.backlog_item_button_element,children:C.jsx(dxe,{theme:"outline",size:a,fill:"#ffffff",strokeWidth:3})}),g.currentStageState.vocal?C.jsx("div",{onClick:()=>{r();const A=document.getElementById("backlog_audio_play_element_"+v);if(A){A.currentTime=0;const O=te.getState().userData,P=O.optionData.volumeMain;A.volume=P*.01*O.optionData.vocalVolume*.01,A==null||A.play()}},onMouseEnter:e,className:Ur.backlog_item_button_element,children:C.jsx(mxe,{theme:"outline",size:a,fill:"#ffffff",strokeWidth:3})}):null]}),C.jsx("div",{className:Ur.backlog_item_content_name,children:E})]}),C.jsx("div",{className:Ur.backlog_item_content,children:C.jsx("span",{className:Ur.backlog_item_content_text,children:x})}),C.jsx("audio",{id:"backlog_audio_play_element_"+v,src:g.currentStageState.vocal})]},"backlogItem"+g.currentStageState.showText+g.saveScene.currentSentenceId);p.unshift(T)}return p},[((d=(h=L.backlogManager.getBacklog()[L.backlogManager.getBacklog().length-1])==null?void 0:h.saveScene)==null?void 0:d.currentSentenceId)??0]);return ne.useEffect(()=>{n.showBacklog?(c.current&&clearTimeout(c.current),s(!1),l(!0),setTimeout(()=>{l(!1)},0)):c.current=setTimeout(()=>{s(!0),c.current=void 0},700+80)},[n.showBacklog]),C.jsx(C.Fragment,{children:C.jsxs("div",{className:` ${n.showBacklog?Ur.Backlog_main:Ur.Backlog_main_out} ${o?Ur.Backlog_main_out_IndexHide:""} - `,children:[C.jsxs("div",{className:Ur.backlog_top,children:[C.jsx(eB,{className:Ur.backlog_top_icon,onClick:()=>{r(),i(rt({component:"showBacklog",visibility:!1})),i(rt({component:"showTextBox",visibility:!0}))},onMouseEnter:e,theme:"outline",size:"4em",fill:"#ffffff",strokeWidth:3}),C.jsx("div",{className:Ur.backlog_title,onClick:()=>{ge.info("Rua! Testing")},children:t("buttons.backlog")})]}),n.showBacklog&&C.jsx("div",{className:`${Ur.backlog_content} ${u?Ur.Backlog_main_DisableScroll:""}`,children:f})]})})};function RO(t){let e=[],r="";for(let n=0;nv.GUI.titleBgm),n=Ne(v=>v.userData.appreciationData),i="Title_BGM",a=wi(!1);let o=i,s=-1;const u=39,l=a.value?"80%":"10%",c=n.bgm.length;n.bgm.forEach((v,g)=>{v.url===r&&(o=v.name,s=g)});const f=wi("");o!==i&&o!==f.value&&f.set(o);const h=Lr();function d(v){const g=n.bgm[v];f.set(g.name),h(dp({asset:"titleBgm",value:g.url}))}const p=n.bgm.map((v,g)=>{let m=Pt.bgmElement;return v.name===f.value&&(m=m+" "+Pt.bgmElement_active),C.jsx("div",{onClick:()=>{t(),f.set(v.name),h(dp({asset:"titleBgm",value:v.url}))},className:m,style:{animationDelay:`${g*150}ms`},onMouseEnter:e,children:v.name},v.name)});return C.jsxs("div",{className:Pt.bgmContainer,style:{maxHeight:l},children:[C.jsxs("div",{className:Pt.bgmPlayerMain,children:[C.jsx("div",{onClick:()=>{t(),s<=0?d(c-1):d(s-1)},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(nxe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{onClick:()=>{t();const v=document.getElementById("currentBgm");v==null||v.play().then()},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(nB,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{onClick:()=>{t(),s>=c-1?d(0):d(s+1)},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(rxe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{onClick:()=>{t(),document.getElementById("currentBgm").pause()},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(dxe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{className:Pt.bgmName,children:o}),C.jsx("div",{onClick:()=>{t(),a.set(!a.value)},onMouseEnter:e,className:Pt.bgmControlButton,style:{marginLeft:"auto"},children:C.jsx(lxe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})})]}),a.value&&C.jsxs("div",{className:Pt.bgmListContainer,children:[" ",p]})]})}function rSe(t){const e=wi(!1),{playSeEnter:r,playSeClick:n}=_n();return C.jsxs(C.Fragment,{children:[e.value&&C.jsx("div",{onClick:()=>{e.set(!e.value),n()},className:Pt.showFullContainer,onMouseEnter:r,children:C.jsx("div",{className:Pt.showFullCgMain,children:C.jsx("div",{style:{backgroundImage:`url('${t.imgUrl}')`,backgroundSize:"cover",backgroundPosition:"center",width:"100%",height:"100%"}})})}),C.jsx("div",{onClick:()=>{e.set(!e.value),n()},onMouseEnter:r,style:{animation:`cg_softIn_${t.transformDeg} 1.5s ease-out ${100+t.index*100}ms forwards `},className:Pt.cgElement,children:C.jsx("div",{style:{backgroundImage:`url('${t.imgUrl}')`,backgroundSize:"cover",backgroundPosition:"center",width:"100%",height:"100%"}})},t.name)]})}function nSe(){const e=Ne(l=>l.userData.appreciationData),r=Math.ceil(e.cg.length/8),n=wi(1),{playSeEnter:i,playSeClick:a}=_n(),o=[],s=e.cg.length;for(let l=(n.value-1)*8;l{n.set(l),a()},onMouseEnter:i,className:c,children:l},"nav"+l);u.push(f)}return C.jsxs("div",{className:Pt.cgMain,children:[C.jsx("div",{className:Pt.cgShowDiv,children:C.jsx("div",{className:Pt.cgShowDivWarpper,children:u})}),C.jsx("div",{className:Pt.cgContainer,children:o})]})}function iSe(t,e){return Math.round(Math.random()*(e-t))+t}function aSe(){const{playSeClick:t}=_n(),e=Ne(i=>i.GUI.showExtra),r=Lr(),n=On("extra.");return C.jsx(C.Fragment,{children:e&&C.jsxs("div",{className:Pt.extra,children:[C.jsxs("div",{className:Pt.extra_top,children:[C.jsx(eB,{className:Pt.extra_top_icon,onClick:()=>{r(rt({component:"showExtra",visibility:!1})),t()},onMouseEnter:t,theme:"outline",size:"4em",fill:"#fff",strokeWidth:3}),C.jsx("div",{className:Pt.extra_title,children:n("title")})]}),C.jsxs("div",{className:Pt.mainContainer,children:[C.jsx(nSe,{}),C.jsx(tSe,{})]})]})})}const oSe="_tag_yghix_2",sSe="_container_yghix_17",lSe="_showContainer_yghix_1",uSe="_singleButton_yghix_33",cSe="_button_text_yghix_37",wr={tag:oSe,container:sSe,showContainer:lSe,singleButton:uSe,button_text:cSe},fSe=()=>{const t=wi(!1),e=Ne(a=>a.stage),r=Lr(),n=(a,o)=>{r(rt({component:a,visibility:o}))},i=a=>{r(ss(a))};return C.jsx(C.Fragment,{children:e.enableFilm!==""&&C.jsxs(C.Fragment,{children:[C.jsx("div",{className:wr.tag,onClick:()=>{t.set(!t.value)},children:C.jsx(ixe,{theme:"outline",size:"32",fill:"#fff"})}),t.value&&C.jsxs("div",{className:wr.container,children:[C.jsx("span",{className:wr.singleButton,onClick:()=>{n("showBacklog",!0),n("showTextBox",!1),t.set(!t.value)},children:C.jsx("span",{className:wr.button_text,children:"剧情回想 / BACKLOG"})}),C.jsx("span",{className:wr.singleButton,onClick:()=>{t.set(!t.value);let a=document.getElementById("currentVocal");a!==null&&(a.currentTime=0,a.pause(),a==null||a.play())},children:C.jsx("span",{className:wr.button_text,children:"重播语音 / REPLAY VOICE"})}),C.jsx("span",{id:"Button_ControlPanel_auto",className:wr.singleButton,onClick:()=>{EN(),t.set(!t.value)},children:C.jsx("span",{className:wr.button_text,children:"自动模式 / AUTO"})}),C.jsx("span",{id:"Button_ControlPanel_fast",className:wr.singleButton,onClick:()=>{PN(),t.set(!t.value)},children:C.jsx("span",{className:wr.button_text,children:"快进 / FAST"})}),C.jsx("span",{className:wr.singleButton,onClick:()=>{t.set(!t.value),i(vt.Save),n("showMenuPanel",!0)},children:C.jsx("span",{className:wr.button_text,children:"存档 / SAVE"})}),C.jsx("span",{className:wr.singleButton,onClick:()=>{t.set(!t.value),i(vt.Load),n("showMenuPanel",!0)},children:C.jsx("span",{className:wr.button_text,children:"读档 / LOAD"})}),C.jsx("span",{className:wr.singleButton,onClick:()=>{t.set(!t.value),i(vt.Option),n("showMenuPanel",!0)},children:C.jsx("span",{className:wr.button_text,children:"选项 / OPTIONS"})}),C.jsx("span",{className:wr.singleButton,onClick:()=>{t.set(!t.value),FE()},children:C.jsx("span",{className:wr.button_text,children:"标题 / TITLE"})})]})]})})},hSe="_devPanelMain_11x6i_1",dSe="_devPanelOpener_11x6i_13",IO={devPanelMain:hSe,devPanelOpener:dSe};function pSe(){document.getElementById("pixiCanvas").toBlob(e=>{if(e){const r=document.createElement("a");document.body.append(r),r.download="screenshot",r.href=URL.createObjectURL(e),r.click(),r.remove()}},"image/png")}function vSe(){function t(){return!!window.location.hash.match(/dev/)}const e=wi(!1),r=wi(window.location.hash),n=Ne(u=>u.stage);ne.useEffect(()=>{window.onhashchange=()=>{r.set(window.location.hash)}},[]);const i=t(),{t:a,i18n:o}=Qv(),s=C.jsxs(C.Fragment,{children:[C.jsx("div",{onClick:()=>pSe(),children:"Save PIXI Screenshot"}),C.jsxs("div",{children:["Current Language:",o.language]}),C.jsx("div",{onClick:()=>{var u;return(u=L.gameplay.pixiStage)==null?void 0:u.removeAnimation("snow-Ticker")},children:"Remove Snow Ticker"}),C.jsx("div",{children:"Stage State"}),C.jsx("div",{children:JSON.stringify(n,null," ")})]});return C.jsxs(C.Fragment,{children:[i&&e.value&&C.jsxs("div",{className:IO.devPanelMain,children:[C.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[C.jsx("div",{onClick:()=>e.set(!1),style:{fontSize:"150%",padding:"0 0 0 15px",cursor:"pointer"},children:"×"}),C.jsx("div",{style:{padding:"0 0 0 15px",fontSize:"115%"},children:"WebGAL DEV PANEL"})]}),C.jsx("div",{style:{padding:"10px 10px 10px 10px",overflow:"auto"},children:s})]}),!e.value&&i&&C.jsx("div",{onClick:()=>e.set(!0),className:IO.devPanelOpener,children:"Open Dev Panel"})]})}const mSe="_trans_8uz61_2",gSe="_langWrapper_8uz61_10",ySe="_lang_8uz61_10",_Se="_langSelect_8uz61_29",xSe="_langSelectButton_8uz61_35",Zu={trans:mSe,langWrapper:gSe,lang:ySe,langSelect:_Se,langSelectButton:xSe};function bSe(){const t=oB(),[e,r]=ne.useState(!1);ne.useEffect(()=>{(window==null?void 0:window.localStorage.getItem("lang"))?t(Number(window==null?void 0:window.localStorage.getItem("lang")),!1):r(!0)},[]);const n=i=>{r(!1),t(i)};return C.jsx(C.Fragment,{children:e&&C.jsx("div",{className:Zu.trans,children:C.jsxs("div",{className:Zu.langWrapper,children:[C.jsx("div",{className:Zu.lang,children:"LANGUAGE SELECT"}),C.jsx("div",{className:Zu.langSelect,children:Object.keys(ip).map(i=>C.jsx("div",{className:Zu.langSelectButton,onClick:()=>n(Is[i]),children:ip[i]},i))})]})})})}const SSe="_panic_overlay_main_1ysz4_1",wSe={panic_overlay_main:SSe},ESe="_yoozle_blue_1r48o_1",TSe="_yoozle_red_1r48o_5",ASe="_yoozle_yellow_1r48o_9",CSe="_yoozle_green_1r48o_13",PSe="_yoozle_e_rotate_1r48o_17",OSe="_yoozle_container_1r48o_22",RSe="_yoozle_title_1r48o_28",ISe="_yoozle_search_1r48o_37",kSe="_yoozle_search_bar_1r48o_44",MSe="_yoozle_search_buttons_1r48o_51",FSe="_yoozle_button_1r48o_55",bn={yoozle_blue:ESe,yoozle_red:TSe,yoozle_yellow:ASe,yoozle_green:CSe,yoozle_e_rotate:PSe,yoozle_container:OSe,yoozle_title:RSe,yoozle_search:ISe,yoozle_search_bar:kSe,yoozle_search_buttons:MSe,yoozle_button:FSe},NSe=()=>(ne.useEffect(()=>{const t="Yoozle Search",e=document.title;return document.title=t,()=>{document.title=e}},[]),C.jsxs("div",{className:bn.yoozle_container,children:[C.jsx("div",{className:bn.yoozle_title,children:C.jsxs("span",{children:[C.jsx("span",{className:bn.yoozle_blue,style:{marginRight:"1px"},children:"Y"}),C.jsx("span",{className:bn.yoozle_red,children:"o"}),C.jsx("span",{className:bn.yoozle_yellow,children:"o"}),C.jsx("span",{className:bn.yoozle_blue,children:"z"}),C.jsx("span",{className:bn.yoozle_green,children:"l"}),C.jsx("span",{className:`${bn.yoozle_red} ${bn.yoozle_e_rotate}`,children:"e"})]})}),C.jsxs("div",{className:bn.yoozle_search,children:[C.jsx("input",{className:bn.yoozle_search_bar,type:"text",defaultValue:""}),C.jsxs("div",{className:bn.yoozle_search_buttons,children:[C.jsx("input",{className:bn.yoozle_button,type:"submit",value:"Yoozle Search"}),C.jsx("input",{className:bn.yoozle_button,type:"submit",value:"Feeling Lucky"})]})]})]})),LSe=()=>{const t=Ne(n=>n.GUI),[e,r]=ne.useState(!1);return ne.useEffect(()=>{r(t.showPanicOverlay)},[t.showPanicOverlay]),ea.createPortal(C.jsx("div",{className:e?wSe.panic_overlay_main:"",children:e&&C.jsx(NSe,{})}),document.querySelector("div#panic-overlay"))};function DSe(){const t=Ne(i=>i.userData),e=Ne(i=>i.GUI);Lr();const r=t.optionData.fullScreen,n=e.isEnterGame;ne.useEffect(()=>{switch(r){case Qi.on:{n&&(document.documentElement.requestFullscreen(),ul&&ul.lock(["Escape","F11"]));break}case Qi.off:{document.fullscreenElement&&(document.exitFullscreen(),ul&&ul.unlock());break}}},[r])}function BSe(){return ne.useEffect(()=>{N_e()},[]),DSe(),C.jsxs("div",{className:"App",children:[C.jsx(bSe,{}),C.jsx(Pbe,{}),C.jsx(Obe,{}),C.jsx(fSe,{}),C.jsx(Rbe,{}),C.jsx(rle,{}),C.jsx(sle,{}),C.jsx(aSe,{}),C.jsx(z1e,{}),C.jsx(Exe,{}),C.jsx(LSe,{}),C.jsx(vSe,{})]})}function go(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p1(t,e){return p1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},p1(t,e)}function bm(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p1(t,e)}function Qf(t,e){if(e&&(Rr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return go(t)}function aa(t){return aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},aa(t)}function jSe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function USe(t){return xN(t)||jSe(t)||bN(t)||SN()}function kO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function MO(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};Ti(this,t),this.init(e,r)}return Ai(t,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||$Se,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i1?n-1:0),a=1;a-1?s.replace(/###/g,"."):s}function i(){return!t||typeof t=="string"}for(var a=typeof e!="string"?[].concat(e):e.split(".");a.length>1;){if(i())return{};var o=n(a.shift());!t[o]&&r&&(t[o]=new r),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={}}return i()?{}:{obj:t,k:n(a.shift())}}function NO(t,e,r){var n=NE(t,e,Object),i=n.obj,a=n.k;i[a]=r}function XSe(t,e,r,n){var i=NE(t,e,Object),a=i.obj,o=i.k;a[o]=a[o]||[],n&&(a[o]=a[o].concat(r)),n||a[o].push(r)}function Np(t,e){var r=NE(t,e),n=r.obj,i=r.k;if(n)return n[i]}function zSe(t,e,r){var n=Np(t,r);return n!==void 0?n:Np(e,r)}function sB(t,e,r){for(var n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?typeof t[n]=="string"||t[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?r&&(t[n]=e[n]):sB(t[n],e[n],r):t[n]=e[n]);return t}function qs(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var WSe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function YSe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return WSe[e]}):t}var Sm=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,HSe=[" ",",","?","!",";"];function qSe(t,e,r){e=e||"",r=r||"";var n=HSe.filter(function(s){return e.indexOf(s)<0&&r.indexOf(s)<0});if(n.length===0)return!0;var i=new RegExp("(".concat(n.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),a=!i.test(t);if(!a){var o=t.indexOf(r);o>0&&!i.test(t.substring(0,o))&&(a=!0)}return a}function Lp(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[e])return t[e];for(var n=e.split(r),i=t,a=0;aa+o;)o++,s=n.slice(a,a+o).join(r),u=i[s];if(u===void 0)return;if(u===null)return null;if(e.endsWith(s)){if(typeof u=="string")return u;if(s&&typeof u[s]=="string")return u[s]}var l=n.slice(a+o).join(r);return l?Lp(u,l,r):void 0}i=i[n[a]]}return i}}function LO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function qh(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var QSe=function(t){bm(r,t);var e=KSe(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Ti(this,r),i=e.call(this),Sm&&Po.call(go(i)),i.data=n||{},i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return Ai(r,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var a=this.options.ns.indexOf(i);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[i,a];o&&typeof o!="string"&&(c=c.concat(o)),o&&typeof o=="string"&&(c=c.concat(u?o.split(u):o)),i.indexOf(".")>-1&&(c=i.split("."));var f=Np(this.data,c);return f||!l||typeof o!="string"?f:Lp(this.data&&this.data[i]&&this.data[i][a],o,u)}},{key:"addResource",value:function(i,a,o,s){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},l=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,c=[i,a];o&&(c=c.concat(l?o.split(l):o)),i.indexOf(".")>-1&&(c=i.split("."),s=a,a=c[1]),this.addNamespaces(a),NO(this.data,c,s),u.silent||this.emit("added",i,a,o,s)}},{key:"addResources",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var u in o)(typeof o[u]=="string"||Object.prototype.toString.apply(o[u])==="[object Array]")&&this.addResource(i,a,u,o[u],{silent:!0});s.silent||this.emit("added",i,a,o)}},{key:"addResourceBundle",value:function(i,a,o,s,u){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[i,a];i.indexOf(".")>-1&&(c=i.split("."),s=o,o=a,a=c[1]),this.addNamespaces(a);var f=Np(this.data,c)||{};s?sB(f,o,u):f=qh(qh({},f),o),NO(this.data,c,f),l.silent||this.emit("added",i,a,o)}},{key:"removeResourceBundle",value:function(i,a){this.hasResourceBundle(i,a)&&delete this.data[i][a],this.removeNamespaces(a),this.emit("removed",i,a)}},{key:"hasResourceBundle",value:function(i,a){return this.getResource(i,a)!==void 0}},{key:"getResourceBundle",value:function(i,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?qh(qh({},{}),this.getResource(i,a)):this.getResource(i,a)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var a=this.getDataByLanguage(i),o=a&&Object.keys(a)||[];return!!o.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(Po),lB={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,r,n,i,a){var o=this;return e.forEach(function(s){o.processors[s]&&(r=o.processors[s].process(r,n,i,a))}),r}};function DO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Wr(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var BO={},jO=function(t){bm(r,t);var e=JSe(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ti(this,r),i=e.call(this),Sm&&Po.call(go(i)),GSe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,go(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Yi.create("translator"),i}return Ai(r,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var o=this.resolve(i,a);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(i,a){var o=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ns||this.options.defaultNS||[],l=o&&i.indexOf(o)>-1,c=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!qSe(i,o,s);if(l&&!c){var f=i.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:i,namespaces:u};var h=i.split(o);(o!==s||o===s&&this.options.ns.indexOf(h[0])>-1)&&(u=h.shift()),i=h.join(s)}return typeof u=="string"&&(u=[u]),{key:i,namespaces:u}}},{key:"translate",value:function(i,a,o){var s=this;if(Rr(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),Rr(a)==="object"&&(a=Wr({},a)),a||(a={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var u=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,c=this.extractFromKey(i[i.length-1],a),f=c.key,h=c.namespaces,d=h[h.length-1],p=a.lng||this.language,v=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(v){var g=a.nsSeparator||this.options.nsSeparator;return u?{res:"".concat(d).concat(g).concat(f),usedKey:f,exactUsedKey:f,usedLng:p,usedNS:d}:"".concat(d).concat(g).concat(f)}return u?{res:f,usedKey:f,exactUsedKey:f,usedLng:p,usedNS:d}:f}var m=this.resolve(i,a),y=m&&m.res,_=m&&m.usedKey||f,x=m&&m.exactUsedKey||f,b=Object.prototype.toString.apply(y),S=["[object Number]","[object Function]","[object RegExp]"],w=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,T=typeof y!="string"&&typeof y!="boolean"&&typeof y!="number";if(E&&y&&T&&S.indexOf(b)<0&&!(typeof w=="string"&&b==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var A=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,y,Wr(Wr({},a),{},{ns:h})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return u?(m.res=A,m):A}if(l){var O=b==="[object Array]",P=O?[]:{},k=O?x:_;for(var M in y)if(Object.prototype.hasOwnProperty.call(y,M)){var B="".concat(k).concat(l).concat(M);P[M]=this.translate(B,Wr(Wr({},a),{joinArrays:!1,ns:h})),P[M]===B&&(P[M]=y[M])}y=P}}else if(E&&typeof w=="string"&&b==="[object Array]")y=y.join(w),y&&(y=this.extendTranslation(y,i,a,o));else{var j=!1,z=!1,J=a.count!==void 0&&typeof a.count!="string",Z=r.hasDefaultValue(a),$=J?this.pluralResolver.getSuffix(p,a.count,a):"",F=a["defaultValue".concat($)]||a.defaultValue;!this.isValidLookup(y)&&Z&&(j=!0,y=F),this.isValidLookup(y)||(z=!0,y=f);var G=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,V=G&&z?void 0:y,U=Z&&F!==y&&this.options.updateMissing;if(z||j||U){if(this.logger.log(U?"updateKey":"missingKey",p,d,f,U?F:y),l){var H=this.resolve(f,Wr(Wr({},a),{},{keySeparator:!1}));H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var ee=[],ie=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ie&&ie[0])for(var ae=0;ae1&&arguments[1]!==void 0?arguments[1]:{},s,u,l,c,f;return typeof i=="string"&&(i=[i]),i.forEach(function(h){if(!a.isValidLookup(s)){var d=a.extractFromKey(h,o),p=d.key;u=p;var v=d.namespaces;a.options.fallbackNS&&(v=v.concat(a.options.fallbackNS));var g=o.count!==void 0&&typeof o.count!="string",m=g&&!o.ordinal&&o.count===0&&a.pluralResolver.shouldUseIntlApi(),y=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",_=o.lngs?o.lngs:a.languageUtils.toResolveHierarchy(o.lng||a.language,o.fallbackLng);v.forEach(function(x){a.isValidLookup(s)||(f=x,!BO["".concat(_[0],"-").concat(x)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(f)&&(BO["".concat(_[0],"-").concat(x)]=!0,a.logger.warn('key "'.concat(u,'" for languages "').concat(_.join(", "),`" won't get resolved as namespace "`).concat(f,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),_.forEach(function(b){if(!a.isValidLookup(s)){c=b;var S=[p];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(S,p,b,x,o);else{var w;g&&(w=a.pluralResolver.getSuffix(b,o.count,o));var E="".concat(a.options.pluralSeparator,"zero");if(g&&(S.push(p+w),m&&S.push(p+E)),y){var T="".concat(p).concat(a.options.contextSeparator).concat(o.context);S.push(T),g&&(S.push(T+w),m&&S.push(T+E))}}for(var A;A=S.pop();)a.isValidLookup(s)||(l=A,s=a.getResource(b,x,A,o))}}))})}}),{res:s,usedKey:u,exactUsedKey:l,usedLng:c,usedNS:f}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,a,o,s):this.resourceStore.getResource(i,a,o,s)}}],[{key:"hasDefaultValue",value:function(i){var a="defaultValue";for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&a===o.substring(0,a.length)&&i[o]!==void 0)return!0;return!1}}]),r}(Po);function Zy(t){return t.charAt(0).toUpperCase()+t.slice(1)}var UO=function(){function t(e){Ti(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yi.create("languageUtils")}return Ai(t,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],i=r.split("-");return this.options.lowerCaseLng?i=i.map(function(a){return a.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Zy(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Zy(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Zy(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var i;return r.forEach(function(a){if(!i){var o=n.formatLanguageCode(a);(!n.options.supportedLngs||n.isSupportedCode(o))&&(i=o)}}),!i&&this.options.supportedLngs&&r.forEach(function(a){if(!i){var o=n.getLanguagePartFromCode(a);if(n.isSupportedCode(o))return i=o;i=n.options.supportedLngs.find(function(s){if(s===o)return s;if(!(s.indexOf("-")<0&&o.indexOf("-")<0)&&s.indexOf(o)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var i=r[n];return i||(i=r[this.getScriptPartFromCode(n)]),i||(i=r[this.formatLanguageCode(n)]),i||(i=r[this.getLanguagePartFromCode(n)]),i||(i=r.default),i||[]}},{key:"toResolveHierarchy",value:function(r,n){var i=this,a=this.getFallbackCodes(n||this.options.fallbackLng||[],r),o=[],s=function(l){l&&(i.isSupportedCode(l)?o.push(l):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(l)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(r))):typeof r=="string"&&s(this.formatLanguageCode(r)),a.forEach(function(u){o.indexOf(u)<0&&s(i.formatLanguageCode(u))}),o}}]),t}(),twe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],rwe={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}},nwe=["v1","v2","v3"],$O={zero:0,one:1,two:2,few:3,many:4,other:5};function iwe(){var t={};return twe.forEach(function(e){e.lngs.forEach(function(r){t[r]={numbers:e.nr,plurals:rwe[e.fc]}})}),t}var awe=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ti(this,t),this.languageUtils=e,this.options=r,this.logger=Yi.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=iwe()}return Ai(t,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(r,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,i).map(function(a){return"".concat(n).concat(a)})}},{key:"getSuffixes",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(r,i);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(o,s){return $O[o]-$O[s]}).map(function(o){return"".concat(n.options.prepend).concat(o)}):a.numbers.map(function(o){return n.getSuffix(r,o,i)}):[]}},{key:"getSuffix",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(r,i);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(n)):this.getSuffixRetroCompatible(a,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var i=this,a=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),o=r.numbers[a];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var s=function(){return i.options.prepend&&o.toString()?i.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!nwe.includes(this.options.compatibilityJSON)}}]),t}();function VO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fi(t){for(var e=1;e3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=zSe(t,e,r);return!a&&i&&typeof r=="string"&&(a=Lp(t,r,n),a===void 0&&(a=Lp(e,r,n))),a}var owe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti(this,t),this.logger=Yi.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(r){return r},this.init(e)}return Ai(t,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:YSe,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?qs(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?qs(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?qs(n.nestingPrefix):n.nestingPrefixEscaped||qs("$t("),this.nestingSuffix=n.nestingSuffix?qs(n.nestingSuffix):n.nestingSuffixEscaped||qs(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(r,n,i,a){var o=this,s,u,l,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(g){return g.replace(/\$/g,"$$$$")}var h=function(m){if(m.indexOf(o.formatSeparator)<0){var y=GO(n,c,m,o.options.keySeparator,o.options.ignoreJSONStructure);return o.alwaysFormat?o.format(y,void 0,i,fi(fi(fi({},a),n),{},{interpolationkey:m})):y}var _=m.split(o.formatSeparator),x=_.shift().trim(),b=_.join(o.formatSeparator).trim();return o.format(GO(n,c,x,o.options.keySeparator,o.options.ignoreJSONStructure),b,i,fi(fi(fi({},a),n),{},{interpolationkey:x}))};this.resetRegExp();var d=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,p=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(m){return f(m)}},{regex:this.regexp,safeValue:function(m){return o.escapeValue?f(o.escape(m)):f(m)}}];return v.forEach(function(g){for(l=0;s=g.regex.exec(r);){var m=s[1].trim();if(u=h(m),u===void 0)if(typeof d=="function"){var y=d(r,s,a);u=typeof y=="string"?y:""}else if(a&&Object.prototype.hasOwnProperty.call(a,m))u="";else if(p){u=s[0];continue}else o.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(r)),u="";else typeof u!="string"&&!o.useRawValueToEscape&&(u=FO(u));var _=g.safeValue(u);if(r=r.replace(s[0],_),p?(g.regex.lastIndex+=u.length,g.regex.lastIndex-=s[0].length):g.regex.lastIndex=0,l++,l>=o.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,u;function l(d,p){var v=this.nestingOptionsSeparator;if(d.indexOf(v)<0)return d;var g=d.split(new RegExp("".concat(v,"[ ]*{"))),m="{".concat(g[1]);d=g[0],m=this.interpolate(m,u);var y=m.match(/'/g),_=m.match(/"/g);(y&&y.length%2===0&&!_||_.length%2!==0)&&(m=m.replace(/'/g,'"'));try{u=JSON.parse(m),p&&(u=fi(fi({},p),u))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),x),"".concat(d).concat(v).concat(m)}return delete u.defaultValue,d}for(;o=this.nestingRegexp.exec(r);){var c=[];u=fi({},a),u=u.replace&&typeof u.replace!="string"?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;var f=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var h=o[1].split(this.formatSeparator).map(function(d){return d.trim()});o[1]=h.shift(),c=h,f=!0}if(s=n(l.call(this,o[1].trim(),u),u),s&&o[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=FO(s)),s||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(r)),s=""),f&&(s=c.reduce(function(d,p){return i.format(d,p,a.lng,fi(fi({},a),{},{interpolationkey:o[1].trim()}))},s.trim())),r=r.replace(o[0],s),this.regexp.lastIndex=0}return r}}]),t}();function XO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Sa(t){for(var e=1;e-1){var n=t.split("(");e=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);if(e==="currency"&&i.indexOf(":")<0)r.currency||(r.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)r.range||(r.range=i.trim());else{var a=i.split(";");a.forEach(function(o){if(o){var s=o.split(":"),u=USe(s),l=u[0],c=u.slice(1),f=c.join(":").trim().replace(/^'+|'+$/g,"");r[l.trim()]||(r[l.trim()]=f),f==="false"&&(r[l.trim()]=!1),f==="true"&&(r[l.trim()]=!0),isNaN(f)||(r[l.trim()]=parseInt(f,10))}})}}return{formatName:e,formatOptions:r}}function Ks(t){var e={};return function(n,i,a){var o=i+JSON.stringify(a),s=e[o];return s||(s=t(i,a),e[o]=s),s(n)}}var lwe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti(this,t),this.logger=Yi.create("formatter"),this.options=e,this.formats={number:Ks(function(r,n){var i=new Intl.NumberFormat(r,Sa({},n));return function(a){return i.format(a)}}),currency:Ks(function(r,n){var i=new Intl.NumberFormat(r,Sa(Sa({},n),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:Ks(function(r,n){var i=new Intl.DateTimeFormat(r,Sa({},n));return function(a){return i.format(a)}}),relativetime:Ks(function(r,n){var i=new Intl.RelativeTimeFormat(r,Sa({},n));return function(a){return i.format(a,n.range||"day")}}),list:Ks(function(r,n){var i=new Intl.ListFormat(r,Sa({},n));return function(a){return i.format(a)}})},this.init(e)}return Ai(t,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=n.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=Ks(n)}},{key:"format",value:function(r,n,i){var a=this,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=n.split(this.formatSeparator),u=s.reduce(function(l,c){var f=swe(c),h=f.formatName,d=f.formatOptions;if(a.formats[h]){var p=l;try{var v=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},g=v.locale||v.lng||o.locale||o.lng||i;p=a.formats[h](l,g,Sa(Sa(Sa({},d),o),v))}catch(m){a.logger.warn(m)}return p}else a.logger.warn("there was no format function for ".concat(h));return l},r);return u}}]),t}();function zO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function WO(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fwe(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var hwe=function(t){bm(r,t);var e=uwe(r);function r(n,i,a){var o,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Ti(this,r),o=e.call(this),Sm&&Po.call(go(o)),o.backend=n,o.store=i,o.services=a,o.languageUtils=a.languageUtils,o.options=s,o.logger=Yi.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(a,s.backend,s),o}return Ai(r,[{key:"queueLoad",value:function(i,a,o,s){var u=this,l={},c={},f={},h={};return i.forEach(function(d){var p=!0;a.forEach(function(v){var g="".concat(d,"|").concat(v);!o.reload&&u.store.hasResourceBundle(d,v)?u.state[g]=2:u.state[g]<0||(u.state[g]===1?c[g]===void 0&&(c[g]=!0):(u.state[g]=1,p=!1,c[g]===void 0&&(c[g]=!0),l[g]===void 0&&(l[g]=!0),h[v]===void 0&&(h[v]=!0)))}),p||(f[d]=!0)}),(Object.keys(l).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(l),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(h)}}},{key:"loaded",value:function(i,a,o){var s=i.split("|"),u=s[0],l=s[1];a&&this.emit("failedLoading",u,l,a),o&&this.store.addResourceBundle(u,l,o),this.state[i]=a?-1:2;var c={};this.queue.forEach(function(f){XSe(f.loaded,[u],l),fwe(f,i),a&&f.errors.push(a),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(h){c[h]||(c[h]={});var d=f.loaded[h];d.length&&d.forEach(function(p){c[h][p]===void 0&&(c[h][p]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(i,a,o){var s=this,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!i.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:a,fcName:o,tried:u,wait:l,callback:c});return}this.readingCalls++;var f=function(v,g){if(s.readingCalls--,s.waitingReads.length>0){var m=s.waitingReads.shift();s.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(v&&g&&u2&&arguments[2]!==void 0?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),u&&u();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof a=="string"&&(a=[a]);var l=this.queueLoad(i,a,s,u);if(!l.toLoad.length)return l.pending.length||u(),null;l.toLoad.forEach(function(c){o.loadOne(c)})}},{key:"load",value:function(i,a,o){this.prepareLoading(i,a,{},o)}},{key:"reload",value:function(i,a,o){this.prepareLoading(i,a,{reload:!0},o)}},{key:"loadOne",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),u=s[0],l=s[1];this.read(u,l,"read",void 0,void 0,function(c,f){c&&a.logger.warn("".concat(o,"loading namespace ").concat(l," for language ").concat(u," failed"),c),!c&&f&&a.logger.log("".concat(o,"loaded namespace ").concat(l," for language ").concat(u),f),a.loaded(i,c,f)})}},{key:"saveMissing",value:function(i,a,o,s,u){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if(this.backend&&this.backend.create){var f=WO(WO({},l),{},{isUpdate:u}),h=this.backend.create.bind(this.backend);if(h.length<6)try{var d;h.length===5?d=h(i,a,o,s,f):d=h(i,a,o,s),d&&typeof d.then=="function"?d.then(function(p){return c(null,p)}).catch(c):c(null,d)}catch(p){c(p)}else h(i,a,o,s,c,f)}!i||!i[0]||this.store.addResource(i[0],a,o,s)}}}]),r}(Po);function YO(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var r={};if(Rr(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),Rr(e[2])==="object"||Rr(e[3])==="object"){var n=e[3]||e[2];Object.keys(n).forEach(function(i){r[i]=n[i]})}return r},interpolation:{escapeValue:!0,format:function(e,r,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function HO(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function qO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Di(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kh(){}function vwe(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(r){typeof t[r]=="function"&&(t[r]=t[r].bind(t))})}var Dp=function(t){bm(r,t);var e=dwe(r);function r(){var n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(Ti(this,r),n=e.call(this),Sm&&Po.call(go(n)),n.options=HO(i),n.services={},n.logger=Yi,n.modules={external:[]},vwe(go(n)),a&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,a),Qf(n,go(n));setTimeout(function(){n.init(i,a)},0)}return n}return Ai(r,[{key:"init",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(o=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var s=YO();this.options=Di(Di(Di({},s),this.options),HO(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Di(Di({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function u(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?Yi.init(u(this.modules.logger),this.options):Yi.init(null,this.options);var l;this.modules.formatter?l=this.modules.formatter:typeof Intl<"u"&&(l=lwe);var c=new UO(this.options);this.store=new QSe(this.options.resources,this.options);var f=this.services;f.logger=Yi,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new awe(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=u(l),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new owe(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new hwe(u(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var y=arguments.length,_=new Array(y>1?y-1:0),x=1;x1?y-1:0),x=1;x0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var d=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];d.forEach(function(m){i[m]=function(){var y;return(y=i.store)[m].apply(y,arguments)}});var p=["addResource","addResources","addResourceBundle","removeResourceBundle"];p.forEach(function(m){i[m]=function(){var y;return(y=i.store)[m].apply(y,arguments),i}});var v=Qu(),g=function(){var y=function(x,b){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),v.resolve(b),o(x,b)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return y(null,i.t.bind(i));i.changeLanguage(i.options.lng,y)};return this.options.resources||!this.options.initImmediate?g():setTimeout(g,0),v}},{key:"loadResources",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kh,s=o,u=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(u&&u.toLowerCase()==="cimode")return s();var l=[],c=function(d){if(d){var p=a.services.languageUtils.toResolveHierarchy(d);p.forEach(function(v){l.indexOf(v)<0&&l.push(v)})}};if(u)c(u);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(h){return c(h)})}this.options.preload&&this.options.preload.forEach(function(h){return c(h)}),this.services.backendConnector.load(l,this.options.ns,function(h){!h&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(h)})}else s(null)}},{key:"reloadResources",value:function(i,a,o){var s=Qu();return i||(i=this.languages),a||(a=this.options.ns),o||(o=Kh),this.services.backendConnector.reload(i,a,function(u){s.resolve(),o(u)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&lB.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var a=0;a-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}},{key:"changeLanguage",value:function(i,a){var o=this;this.isLanguageChangingTo=i;var s=Qu();this.emit("languageChanging",i);var u=function(h){o.language=h,o.languages=o.services.languageUtils.toResolveHierarchy(h),o.resolvedLanguage=void 0,o.setResolvedLanguage(h)},l=function(h,d){d?(u(d),o.translator.changeLanguage(d),o.isLanguageChangingTo=void 0,o.emit("languageChanged",d),o.logger.log("languageChanged",d)):o.isLanguageChangingTo=void 0,s.resolve(function(){return o.t.apply(o,arguments)}),a&&a(h,function(){return o.t.apply(o,arguments)})},c=function(h){!i&&!h&&o.services.languageDetector&&(h=[]);var d=typeof h=="string"?h:o.services.languageUtils.getBestMatchFromCodes(h);d&&(o.language||u(d),o.translator.language||o.translator.changeLanguage(d),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage&&o.services.languageDetector.cacheUserLanguage(d)),o.loadResources(d,function(p){l(p,d)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(i),s}},{key:"getFixedT",value:function(i,a,o){var s=this,u=function l(c,f){var h;if(Rr(f)!=="object"){for(var d=arguments.length,p=new Array(d>2?d-2:0),v=2;v1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=o.lng||this.resolvedLanguage||this.languages[0],u=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var c=function(d,p){var v=a.services.backendConnector.state["".concat(d,"|").concat(p)];return v===-1||v===2};if(o.precheck){var f=o.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(s,i)&&(!u||c(l,i)))}},{key:"loadNamespaces",value:function(i,a){var o=this,s=Qu();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(u){o.options.ns.indexOf(u)<0&&o.options.ns.push(u)}),this.loadResources(function(u){s.resolve(),a&&a(u)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(i,a){var o=Qu();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],u=i.filter(function(l){return s.indexOf(l)<0});return u.length?(this.options.preload=s.concat(u),this.loadResources(function(l){o.resolve(),a&&a(l)}),o):(a&&a(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=this.services&&this.services.languageUtils||new UO(YO());return a.indexOf(o.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kh,s=Di(Di(Di({},this.options),a),{isClone:!0}),u=new r(s);(a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a));var l=["store","services","language"];return l.forEach(function(c){u[c]=i[c]}),u.services=Di({},this.services),u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u.translator=new jO(u.services,u.options),u.translator.on("*",function(c){for(var f=arguments.length,h=new Array(f>1?f-1:0),d=1;d0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new Dp(t,e)});var rn=Dp.createInstance();rn.createInstance=Dp.createInstance;rn.createInstance;rn.dir;rn.init;rn.loadResources;rn.reloadResources;rn.use;rn.changeLanguage;rn.getFixedT;rn.t;rn.exists;rn.setDefaultNamespace;rn.hasLoadedNamespace;rn.loadNamespaces;rn.loadLanguages;rn.use(xoe).init({resources:oW||{},lng:Is[sW]||"zhCn",fallbackLng:"zhCn",interpolation:{escapeValue:!1}}).then(()=>console.log("WebGAL i18n Ready!"));ea.render(C.jsx(fe.StrictMode,{children:C.jsx(Eoe,{children:C.jsx(yF,{store:te,children:C.jsx(BSe,{})})})}),document.getElementById("root"));export{mr as C,_i as S,Me as T,L as W,cp as a,_we as r}; + `,children:[C.jsxs("div",{className:Ur.backlog_top,children:[C.jsx(tB,{className:Ur.backlog_top_icon,onClick:()=>{r(),i(rt({component:"showBacklog",visibility:!1})),i(rt({component:"showTextBox",visibility:!0}))},onMouseEnter:e,theme:"outline",size:"4em",fill:"#ffffff",strokeWidth:3}),C.jsx("div",{className:Ur.backlog_title,onClick:()=>{ge.info("Rua! Testing")},children:t("buttons.backlog")})]}),n.showBacklog&&C.jsx("div",{className:`${Ur.backlog_content} ${u?Ur.Backlog_main_DisableScroll:""}`,children:f})]})})};function IO(t){let e=[],r="";for(let n=0;nv.GUI.titleBgm),n=Ne(v=>v.userData.appreciationData),i="Title_BGM",a=wi(!1);let o=i,s=-1;const u=39,l=a.value?"80%":"10%",c=n.bgm.length;n.bgm.forEach((v,g)=>{v.url===r&&(o=v.name,s=g)});const f=wi("");o!==i&&o!==f.value&&f.set(o);const h=Lr();function d(v){const g=n.bgm[v];f.set(g.name),h(dp({asset:"titleBgm",value:g.url}))}const p=n.bgm.map((v,g)=>{let m=Pt.bgmElement;return v.name===f.value&&(m=m+" "+Pt.bgmElement_active),C.jsx("div",{onClick:()=>{t(),f.set(v.name),h(dp({asset:"titleBgm",value:v.url}))},className:m,style:{animationDelay:`${g*150}ms`},onMouseEnter:e,children:v.name},v.name)});return C.jsxs("div",{className:Pt.bgmContainer,style:{maxHeight:l},children:[C.jsxs("div",{className:Pt.bgmPlayerMain,children:[C.jsx("div",{onClick:()=>{t(),s<=0?d(c-1):d(s-1)},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(ixe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{onClick:()=>{t();const v=document.getElementById("currentBgm");v==null||v.play().then()},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(iB,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{onClick:()=>{t(),s>=c-1?d(0):d(s+1)},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(nxe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{onClick:()=>{t(),document.getElementById("currentBgm").pause()},onMouseEnter:e,className:Pt.bgmControlButton,children:C.jsx(pxe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})}),C.jsx("div",{className:Pt.bgmName,children:o}),C.jsx("div",{onClick:()=>{t(),a.set(!a.value)},onMouseEnter:e,className:Pt.bgmControlButton,style:{marginLeft:"auto"},children:C.jsx(uxe,{theme:"filled",size:u,fill:"#fff",strokeWidth:3,strokeLinejoin:"miter"})})]}),a.value&&C.jsxs("div",{className:Pt.bgmListContainer,children:[" ",p]})]})}function nSe(t){const e=wi(!1),{playSeEnter:r,playSeClick:n}=_n();return C.jsxs(C.Fragment,{children:[e.value&&C.jsx("div",{onClick:()=>{e.set(!e.value),n()},className:Pt.showFullContainer,onMouseEnter:r,children:C.jsx("div",{className:Pt.showFullCgMain,children:C.jsx("div",{style:{backgroundImage:`url('${t.imgUrl}')`,backgroundSize:"cover",backgroundPosition:"center",width:"100%",height:"100%"}})})}),C.jsx("div",{onClick:()=>{e.set(!e.value),n()},onMouseEnter:r,style:{animation:`cg_softIn_${t.transformDeg} 1.5s ease-out ${100+t.index*100}ms forwards `},className:Pt.cgElement,children:C.jsx("div",{style:{backgroundImage:`url('${t.imgUrl}')`,backgroundSize:"cover",backgroundPosition:"center",width:"100%",height:"100%"}})},t.name)]})}function iSe(){const e=Ne(l=>l.userData.appreciationData),r=Math.ceil(e.cg.length/8),n=wi(1),{playSeEnter:i,playSeClick:a}=_n(),o=[],s=e.cg.length;for(let l=(n.value-1)*8;l{n.set(l),a()},onMouseEnter:i,className:c,children:l},"nav"+l);u.push(f)}return C.jsxs("div",{className:Pt.cgMain,children:[C.jsx("div",{className:Pt.cgShowDiv,children:C.jsx("div",{className:Pt.cgShowDivWarpper,children:u})}),C.jsx("div",{className:Pt.cgContainer,children:o})]})}function aSe(t,e){return Math.round(Math.random()*(e-t))+t}function oSe(){const{playSeClick:t}=_n(),e=Ne(i=>i.GUI.showExtra),r=Lr(),n=On("extra.");return C.jsx(C.Fragment,{children:e&&C.jsxs("div",{className:Pt.extra,children:[C.jsxs("div",{className:Pt.extra_top,children:[C.jsx(tB,{className:Pt.extra_top_icon,onClick:()=>{r(rt({component:"showExtra",visibility:!1})),t()},onMouseEnter:t,theme:"outline",size:"4em",fill:"#fff",strokeWidth:3}),C.jsx("div",{className:Pt.extra_title,children:n("title")})]}),C.jsxs("div",{className:Pt.mainContainer,children:[C.jsx(iSe,{}),C.jsx(rSe,{})]})]})})}const sSe="_tag_yghix_2",lSe="_container_yghix_17",uSe="_showContainer_yghix_1",cSe="_singleButton_yghix_33",fSe="_button_text_yghix_37",Er={tag:sSe,container:lSe,showContainer:uSe,singleButton:cSe,button_text:fSe},hSe=()=>{const t=wi(!1),e=Ne(a=>a.stage),r=Lr(),n=(a,o)=>{r(rt({component:a,visibility:o}))},i=a=>{r(ss(a))};return C.jsx(C.Fragment,{children:e.enableFilm!==""&&C.jsxs(C.Fragment,{children:[C.jsx("div",{className:Er.tag,onClick:()=>{t.set(!t.value)},children:C.jsx(axe,{theme:"outline",size:"32",fill:"#fff"})}),t.value&&C.jsxs("div",{className:Er.container,children:[C.jsx("span",{className:Er.singleButton,onClick:()=>{n("showBacklog",!0),n("showTextBox",!1),t.set(!t.value)},children:C.jsx("span",{className:Er.button_text,children:"剧情回想 / BACKLOG"})}),C.jsx("span",{className:Er.singleButton,onClick:()=>{t.set(!t.value);let a=document.getElementById("currentVocal");a!==null&&(a.currentTime=0,a.pause(),a==null||a.play())},children:C.jsx("span",{className:Er.button_text,children:"重播语音 / REPLAY VOICE"})}),C.jsx("span",{id:"Button_ControlPanel_auto",className:Er.singleButton,onClick:()=>{TN(),t.set(!t.value)},children:C.jsx("span",{className:Er.button_text,children:"自动模式 / AUTO"})}),C.jsx("span",{id:"Button_ControlPanel_fast",className:Er.singleButton,onClick:()=>{ON(),t.set(!t.value)},children:C.jsx("span",{className:Er.button_text,children:"快进 / FAST"})}),C.jsx("span",{className:Er.singleButton,onClick:()=>{t.set(!t.value),i(vt.Save),n("showMenuPanel",!0)},children:C.jsx("span",{className:Er.button_text,children:"存档 / SAVE"})}),C.jsx("span",{className:Er.singleButton,onClick:()=>{t.set(!t.value),i(vt.Load),n("showMenuPanel",!0)},children:C.jsx("span",{className:Er.button_text,children:"读档 / LOAD"})}),C.jsx("span",{className:Er.singleButton,onClick:()=>{t.set(!t.value),i(vt.Option),n("showMenuPanel",!0)},children:C.jsx("span",{className:Er.button_text,children:"选项 / OPTIONS"})}),C.jsx("span",{className:Er.singleButton,onClick:()=>{t.set(!t.value),NE()},children:C.jsx("span",{className:Er.button_text,children:"标题 / TITLE"})})]})]})})},dSe="_devPanelMain_11x6i_1",pSe="_devPanelOpener_11x6i_13",kO={devPanelMain:dSe,devPanelOpener:pSe};function vSe(){document.getElementById("pixiCanvas").toBlob(e=>{if(e){const r=document.createElement("a");document.body.append(r),r.download="screenshot",r.href=URL.createObjectURL(e),r.click(),r.remove()}},"image/png")}function mSe(){function t(){return!!window.location.hash.match(/dev/)}const e=wi(!1),r=wi(window.location.hash),n=Ne(u=>u.stage);ne.useEffect(()=>{window.onhashchange=()=>{r.set(window.location.hash)}},[]);const i=t(),{t:a,i18n:o}=Qv(),s=C.jsxs(C.Fragment,{children:[C.jsx("div",{onClick:()=>vSe(),children:"Save PIXI Screenshot"}),C.jsxs("div",{children:["Current Language:",o.language]}),C.jsx("div",{onClick:()=>{var u;return(u=L.gameplay.pixiStage)==null?void 0:u.removeAnimation("snow-Ticker")},children:"Remove Snow Ticker"}),C.jsx("div",{children:"Stage State"}),C.jsx("div",{children:JSON.stringify(n,null," ")})]});return C.jsxs(C.Fragment,{children:[i&&e.value&&C.jsxs("div",{className:kO.devPanelMain,children:[C.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[C.jsx("div",{onClick:()=>e.set(!1),style:{fontSize:"150%",padding:"0 0 0 15px",cursor:"pointer"},children:"×"}),C.jsx("div",{style:{padding:"0 0 0 15px",fontSize:"115%"},children:"WebGAL DEV PANEL"})]}),C.jsx("div",{style:{padding:"10px 10px 10px 10px",overflow:"auto"},children:s})]}),!e.value&&i&&C.jsx("div",{onClick:()=>e.set(!0),className:kO.devPanelOpener,children:"Open Dev Panel"})]})}const gSe="_trans_8uz61_2",ySe="_langWrapper_8uz61_10",_Se="_lang_8uz61_10",xSe="_langSelect_8uz61_29",bSe="_langSelectButton_8uz61_35",Zu={trans:gSe,langWrapper:ySe,lang:_Se,langSelect:xSe,langSelectButton:bSe};function SSe(){const t=sB(),[e,r]=ne.useState(!1);ne.useEffect(()=>{(window==null?void 0:window.localStorage.getItem("lang"))?t(Number(window==null?void 0:window.localStorage.getItem("lang")),!1):r(!0)},[]);const n=i=>{r(!1),t(i)};return C.jsx(C.Fragment,{children:e&&C.jsx("div",{className:Zu.trans,children:C.jsxs("div",{className:Zu.langWrapper,children:[C.jsx("div",{className:Zu.lang,children:"LANGUAGE SELECT"}),C.jsx("div",{className:Zu.langSelect,children:Object.keys(ip).map(i=>C.jsx("div",{className:Zu.langSelectButton,onClick:()=>n(Is[i]),children:ip[i]},i))})]})})})}const wSe="_panic_overlay_main_1ysz4_1",ESe={panic_overlay_main:wSe},TSe="_yoozle_blue_1r48o_1",ASe="_yoozle_red_1r48o_5",CSe="_yoozle_yellow_1r48o_9",PSe="_yoozle_green_1r48o_13",OSe="_yoozle_e_rotate_1r48o_17",RSe="_yoozle_container_1r48o_22",ISe="_yoozle_title_1r48o_28",kSe="_yoozle_search_1r48o_37",MSe="_yoozle_search_bar_1r48o_44",FSe="_yoozle_search_buttons_1r48o_51",NSe="_yoozle_button_1r48o_55",bn={yoozle_blue:TSe,yoozle_red:ASe,yoozle_yellow:CSe,yoozle_green:PSe,yoozle_e_rotate:OSe,yoozle_container:RSe,yoozle_title:ISe,yoozle_search:kSe,yoozle_search_bar:MSe,yoozle_search_buttons:FSe,yoozle_button:NSe},LSe=()=>(ne.useEffect(()=>{const t="Yoozle Search",e=document.title;return document.title=t,()=>{document.title=e}},[]),C.jsxs("div",{className:bn.yoozle_container,children:[C.jsx("div",{className:bn.yoozle_title,children:C.jsxs("span",{children:[C.jsx("span",{className:bn.yoozle_blue,style:{marginRight:"1px"},children:"Y"}),C.jsx("span",{className:bn.yoozle_red,children:"o"}),C.jsx("span",{className:bn.yoozle_yellow,children:"o"}),C.jsx("span",{className:bn.yoozle_blue,children:"z"}),C.jsx("span",{className:bn.yoozle_green,children:"l"}),C.jsx("span",{className:`${bn.yoozle_red} ${bn.yoozle_e_rotate}`,children:"e"})]})}),C.jsxs("div",{className:bn.yoozle_search,children:[C.jsx("input",{className:bn.yoozle_search_bar,type:"text",defaultValue:""}),C.jsxs("div",{className:bn.yoozle_search_buttons,children:[C.jsx("input",{className:bn.yoozle_button,type:"submit",value:"Yoozle Search"}),C.jsx("input",{className:bn.yoozle_button,type:"submit",value:"Feeling Lucky"})]})]})]})),DSe=()=>{const t=Ne(n=>n.GUI),[e,r]=ne.useState(!1);return ne.useEffect(()=>{r(t.showPanicOverlay)},[t.showPanicOverlay]),ea.createPortal(C.jsx("div",{className:e?ESe.panic_overlay_main:"",children:e&&C.jsx(LSe,{})}),document.querySelector("div#panic-overlay"))};function BSe(){const t=Ne(i=>i.userData),e=Ne(i=>i.GUI);Lr();const r=t.optionData.fullScreen,n=e.isEnterGame;ne.useEffect(()=>{switch(r){case Qi.on:{n&&(document.documentElement.requestFullscreen(),ul&&ul.lock(["Escape","F11"]));break}case Qi.off:{document.fullscreenElement&&(document.exitFullscreen(),ul&&ul.unlock());break}}},[r])}function jSe(){return ne.useEffect(()=>{L_e()},[]),BSe(),C.jsxs("div",{className:"App",children:[C.jsx(SSe,{}),C.jsx(Obe,{}),C.jsx(Rbe,{}),C.jsx(hSe,{}),C.jsx(Ibe,{}),C.jsx(nle,{}),C.jsx(lle,{}),C.jsx(oSe,{}),C.jsx(W1e,{}),C.jsx(Txe,{}),C.jsx(DSe,{}),C.jsx(mSe,{})]})}function go(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v1(t,e){return v1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},v1(t,e)}function bm(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v1(t,e)}function Qf(t,e){if(e&&(Rr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return go(t)}function aa(t){return aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},aa(t)}function USe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function $Se(t){return bN(t)||USe(t)||SN(t)||wN()}function MO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function FO(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};Ti(this,t),this.init(e,r)}return Ai(t,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||VSe,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i1?n-1:0),a=1;a-1?s.replace(/###/g,"."):s}function i(){return!t||typeof t=="string"}for(var a=typeof e!="string"?[].concat(e):e.split(".");a.length>1;){if(i())return{};var o=n(a.shift());!t[o]&&r&&(t[o]=new r),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={}}return i()?{}:{obj:t,k:n(a.shift())}}function LO(t,e,r){var n=LE(t,e,Object),i=n.obj,a=n.k;i[a]=r}function zSe(t,e,r,n){var i=LE(t,e,Object),a=i.obj,o=i.k;a[o]=a[o]||[],n&&(a[o]=a[o].concat(r)),n||a[o].push(r)}function Np(t,e){var r=LE(t,e),n=r.obj,i=r.k;if(n)return n[i]}function WSe(t,e,r){var n=Np(t,r);return n!==void 0?n:Np(e,r)}function lB(t,e,r){for(var n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?typeof t[n]=="string"||t[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?r&&(t[n]=e[n]):lB(t[n],e[n],r):t[n]=e[n]);return t}function qs(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var YSe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function HSe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return YSe[e]}):t}var Sm=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,qSe=[" ",",","?","!",";"];function KSe(t,e,r){e=e||"",r=r||"";var n=qSe.filter(function(s){return e.indexOf(s)<0&&r.indexOf(s)<0});if(n.length===0)return!0;var i=new RegExp("(".concat(n.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),a=!i.test(t);if(!a){var o=t.indexOf(r);o>0&&!i.test(t.substring(0,o))&&(a=!0)}return a}function Lp(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[e])return t[e];for(var n=e.split(r),i=t,a=0;aa+o;)o++,s=n.slice(a,a+o).join(r),u=i[s];if(u===void 0)return;if(u===null)return null;if(e.endsWith(s)){if(typeof u=="string")return u;if(s&&typeof u[s]=="string")return u[s]}var l=n.slice(a+o).join(r);return l?Lp(u,l,r):void 0}i=i[n[a]]}return i}}function DO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function qh(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var JSe=function(t){bm(r,t);var e=ZSe(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Ti(this,r),i=e.call(this),Sm&&Po.call(go(i)),i.data=n||{},i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return Ai(r,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var a=this.options.ns.indexOf(i);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[i,a];o&&typeof o!="string"&&(c=c.concat(o)),o&&typeof o=="string"&&(c=c.concat(u?o.split(u):o)),i.indexOf(".")>-1&&(c=i.split("."));var f=Np(this.data,c);return f||!l||typeof o!="string"?f:Lp(this.data&&this.data[i]&&this.data[i][a],o,u)}},{key:"addResource",value:function(i,a,o,s){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},l=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,c=[i,a];o&&(c=c.concat(l?o.split(l):o)),i.indexOf(".")>-1&&(c=i.split("."),s=a,a=c[1]),this.addNamespaces(a),LO(this.data,c,s),u.silent||this.emit("added",i,a,o,s)}},{key:"addResources",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var u in o)(typeof o[u]=="string"||Object.prototype.toString.apply(o[u])==="[object Array]")&&this.addResource(i,a,u,o[u],{silent:!0});s.silent||this.emit("added",i,a,o)}},{key:"addResourceBundle",value:function(i,a,o,s,u){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[i,a];i.indexOf(".")>-1&&(c=i.split("."),s=o,o=a,a=c[1]),this.addNamespaces(a);var f=Np(this.data,c)||{};s?lB(f,o,u):f=qh(qh({},f),o),LO(this.data,c,f),l.silent||this.emit("added",i,a,o)}},{key:"removeResourceBundle",value:function(i,a){this.hasResourceBundle(i,a)&&delete this.data[i][a],this.removeNamespaces(a),this.emit("removed",i,a)}},{key:"hasResourceBundle",value:function(i,a){return this.getResource(i,a)!==void 0}},{key:"getResourceBundle",value:function(i,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?qh(qh({},{}),this.getResource(i,a)):this.getResource(i,a)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var a=this.getDataByLanguage(i),o=a&&Object.keys(a)||[];return!!o.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(Po),uB={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,r,n,i,a){var o=this;return e.forEach(function(s){o.processors[s]&&(r=o.processors[s].process(r,n,i,a))}),r}};function BO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Wr(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var jO={},UO=function(t){bm(r,t);var e=ewe(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ti(this,r),i=e.call(this),Sm&&Po.call(go(i)),XSe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,go(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Yi.create("translator"),i}return Ai(r,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var o=this.resolve(i,a);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(i,a){var o=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ns||this.options.defaultNS||[],l=o&&i.indexOf(o)>-1,c=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!KSe(i,o,s);if(l&&!c){var f=i.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:i,namespaces:u};var h=i.split(o);(o!==s||o===s&&this.options.ns.indexOf(h[0])>-1)&&(u=h.shift()),i=h.join(s)}return typeof u=="string"&&(u=[u]),{key:i,namespaces:u}}},{key:"translate",value:function(i,a,o){var s=this;if(Rr(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),Rr(a)==="object"&&(a=Wr({},a)),a||(a={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var u=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,c=this.extractFromKey(i[i.length-1],a),f=c.key,h=c.namespaces,d=h[h.length-1],p=a.lng||this.language,v=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(v){var g=a.nsSeparator||this.options.nsSeparator;return u?{res:"".concat(d).concat(g).concat(f),usedKey:f,exactUsedKey:f,usedLng:p,usedNS:d}:"".concat(d).concat(g).concat(f)}return u?{res:f,usedKey:f,exactUsedKey:f,usedLng:p,usedNS:d}:f}var m=this.resolve(i,a),y=m&&m.res,_=m&&m.usedKey||f,x=m&&m.exactUsedKey||f,b=Object.prototype.toString.apply(y),S=["[object Number]","[object Function]","[object RegExp]"],w=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,T=typeof y!="string"&&typeof y!="boolean"&&typeof y!="number";if(E&&y&&T&&S.indexOf(b)<0&&!(typeof w=="string"&&b==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var A=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,y,Wr(Wr({},a),{},{ns:h})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return u?(m.res=A,m):A}if(l){var O=b==="[object Array]",P=O?[]:{},k=O?x:_;for(var M in y)if(Object.prototype.hasOwnProperty.call(y,M)){var B="".concat(k).concat(l).concat(M);P[M]=this.translate(B,Wr(Wr({},a),{joinArrays:!1,ns:h})),P[M]===B&&(P[M]=y[M])}y=P}}else if(E&&typeof w=="string"&&b==="[object Array]")y=y.join(w),y&&(y=this.extendTranslation(y,i,a,o));else{var j=!1,z=!1,J=a.count!==void 0&&typeof a.count!="string",Z=r.hasDefaultValue(a),$=J?this.pluralResolver.getSuffix(p,a.count,a):"",F=a["defaultValue".concat($)]||a.defaultValue;!this.isValidLookup(y)&&Z&&(j=!0,y=F),this.isValidLookup(y)||(z=!0,y=f);var G=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,V=G&&z?void 0:y,U=Z&&F!==y&&this.options.updateMissing;if(z||j||U){if(this.logger.log(U?"updateKey":"missingKey",p,d,f,U?F:y),l){var H=this.resolve(f,Wr(Wr({},a),{},{keySeparator:!1}));H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var ee=[],ie=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ie&&ie[0])for(var ae=0;ae1&&arguments[1]!==void 0?arguments[1]:{},s,u,l,c,f;return typeof i=="string"&&(i=[i]),i.forEach(function(h){if(!a.isValidLookup(s)){var d=a.extractFromKey(h,o),p=d.key;u=p;var v=d.namespaces;a.options.fallbackNS&&(v=v.concat(a.options.fallbackNS));var g=o.count!==void 0&&typeof o.count!="string",m=g&&!o.ordinal&&o.count===0&&a.pluralResolver.shouldUseIntlApi(),y=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",_=o.lngs?o.lngs:a.languageUtils.toResolveHierarchy(o.lng||a.language,o.fallbackLng);v.forEach(function(x){a.isValidLookup(s)||(f=x,!jO["".concat(_[0],"-").concat(x)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(f)&&(jO["".concat(_[0],"-").concat(x)]=!0,a.logger.warn('key "'.concat(u,'" for languages "').concat(_.join(", "),`" won't get resolved as namespace "`).concat(f,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),_.forEach(function(b){if(!a.isValidLookup(s)){c=b;var S=[p];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(S,p,b,x,o);else{var w;g&&(w=a.pluralResolver.getSuffix(b,o.count,o));var E="".concat(a.options.pluralSeparator,"zero");if(g&&(S.push(p+w),m&&S.push(p+E)),y){var T="".concat(p).concat(a.options.contextSeparator).concat(o.context);S.push(T),g&&(S.push(T+w),m&&S.push(T+E))}}for(var A;A=S.pop();)a.isValidLookup(s)||(l=A,s=a.getResource(b,x,A,o))}}))})}}),{res:s,usedKey:u,exactUsedKey:l,usedLng:c,usedNS:f}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,a,o,s):this.resourceStore.getResource(i,a,o,s)}}],[{key:"hasDefaultValue",value:function(i){var a="defaultValue";for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&a===o.substring(0,a.length)&&i[o]!==void 0)return!0;return!1}}]),r}(Po);function Zy(t){return t.charAt(0).toUpperCase()+t.slice(1)}var $O=function(){function t(e){Ti(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yi.create("languageUtils")}return Ai(t,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],i=r.split("-");return this.options.lowerCaseLng?i=i.map(function(a){return a.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Zy(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Zy(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Zy(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var i;return r.forEach(function(a){if(!i){var o=n.formatLanguageCode(a);(!n.options.supportedLngs||n.isSupportedCode(o))&&(i=o)}}),!i&&this.options.supportedLngs&&r.forEach(function(a){if(!i){var o=n.getLanguagePartFromCode(a);if(n.isSupportedCode(o))return i=o;i=n.options.supportedLngs.find(function(s){if(s===o)return s;if(!(s.indexOf("-")<0&&o.indexOf("-")<0)&&s.indexOf(o)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var i=r[n];return i||(i=r[this.getScriptPartFromCode(n)]),i||(i=r[this.formatLanguageCode(n)]),i||(i=r[this.getLanguagePartFromCode(n)]),i||(i=r.default),i||[]}},{key:"toResolveHierarchy",value:function(r,n){var i=this,a=this.getFallbackCodes(n||this.options.fallbackLng||[],r),o=[],s=function(l){l&&(i.isSupportedCode(l)?o.push(l):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(l)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(r))):typeof r=="string"&&s(this.formatLanguageCode(r)),a.forEach(function(u){o.indexOf(u)<0&&s(i.formatLanguageCode(u))}),o}}]),t}(),rwe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],nwe={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}},iwe=["v1","v2","v3"],VO={zero:0,one:1,two:2,few:3,many:4,other:5};function awe(){var t={};return rwe.forEach(function(e){e.lngs.forEach(function(r){t[r]={numbers:e.nr,plurals:nwe[e.fc]}})}),t}var owe=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ti(this,t),this.languageUtils=e,this.options=r,this.logger=Yi.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=awe()}return Ai(t,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(r,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,i).map(function(a){return"".concat(n).concat(a)})}},{key:"getSuffixes",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(r,i);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(o,s){return VO[o]-VO[s]}).map(function(o){return"".concat(n.options.prepend).concat(o)}):a.numbers.map(function(o){return n.getSuffix(r,o,i)}):[]}},{key:"getSuffix",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(r,i);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(n)):this.getSuffixRetroCompatible(a,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var i=this,a=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),o=r.numbers[a];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var s=function(){return i.options.prepend&&o.toString()?i.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!iwe.includes(this.options.compatibilityJSON)}}]),t}();function GO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fi(t){for(var e=1;e3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=WSe(t,e,r);return!a&&i&&typeof r=="string"&&(a=Lp(t,r,n),a===void 0&&(a=Lp(e,r,n))),a}var swe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti(this,t),this.logger=Yi.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(r){return r},this.init(e)}return Ai(t,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:HSe,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?qs(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?qs(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?qs(n.nestingPrefix):n.nestingPrefixEscaped||qs("$t("),this.nestingSuffix=n.nestingSuffix?qs(n.nestingSuffix):n.nestingSuffixEscaped||qs(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(r,n,i,a){var o=this,s,u,l,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(g){return g.replace(/\$/g,"$$$$")}var h=function(m){if(m.indexOf(o.formatSeparator)<0){var y=XO(n,c,m,o.options.keySeparator,o.options.ignoreJSONStructure);return o.alwaysFormat?o.format(y,void 0,i,fi(fi(fi({},a),n),{},{interpolationkey:m})):y}var _=m.split(o.formatSeparator),x=_.shift().trim(),b=_.join(o.formatSeparator).trim();return o.format(XO(n,c,x,o.options.keySeparator,o.options.ignoreJSONStructure),b,i,fi(fi(fi({},a),n),{},{interpolationkey:x}))};this.resetRegExp();var d=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,p=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(m){return f(m)}},{regex:this.regexp,safeValue:function(m){return o.escapeValue?f(o.escape(m)):f(m)}}];return v.forEach(function(g){for(l=0;s=g.regex.exec(r);){var m=s[1].trim();if(u=h(m),u===void 0)if(typeof d=="function"){var y=d(r,s,a);u=typeof y=="string"?y:""}else if(a&&Object.prototype.hasOwnProperty.call(a,m))u="";else if(p){u=s[0];continue}else o.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(r)),u="";else typeof u!="string"&&!o.useRawValueToEscape&&(u=NO(u));var _=g.safeValue(u);if(r=r.replace(s[0],_),p?(g.regex.lastIndex+=u.length,g.regex.lastIndex-=s[0].length):g.regex.lastIndex=0,l++,l>=o.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,u;function l(d,p){var v=this.nestingOptionsSeparator;if(d.indexOf(v)<0)return d;var g=d.split(new RegExp("".concat(v,"[ ]*{"))),m="{".concat(g[1]);d=g[0],m=this.interpolate(m,u);var y=m.match(/'/g),_=m.match(/"/g);(y&&y.length%2===0&&!_||_.length%2!==0)&&(m=m.replace(/'/g,'"'));try{u=JSON.parse(m),p&&(u=fi(fi({},p),u))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),x),"".concat(d).concat(v).concat(m)}return delete u.defaultValue,d}for(;o=this.nestingRegexp.exec(r);){var c=[];u=fi({},a),u=u.replace&&typeof u.replace!="string"?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;var f=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var h=o[1].split(this.formatSeparator).map(function(d){return d.trim()});o[1]=h.shift(),c=h,f=!0}if(s=n(l.call(this,o[1].trim(),u),u),s&&o[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=NO(s)),s||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(r)),s=""),f&&(s=c.reduce(function(d,p){return i.format(d,p,a.lng,fi(fi({},a),{},{interpolationkey:o[1].trim()}))},s.trim())),r=r.replace(o[0],s),this.regexp.lastIndex=0}return r}}]),t}();function zO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Sa(t){for(var e=1;e-1){var n=t.split("(");e=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);if(e==="currency"&&i.indexOf(":")<0)r.currency||(r.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)r.range||(r.range=i.trim());else{var a=i.split(";");a.forEach(function(o){if(o){var s=o.split(":"),u=$Se(s),l=u[0],c=u.slice(1),f=c.join(":").trim().replace(/^'+|'+$/g,"");r[l.trim()]||(r[l.trim()]=f),f==="false"&&(r[l.trim()]=!1),f==="true"&&(r[l.trim()]=!0),isNaN(f)||(r[l.trim()]=parseInt(f,10))}})}}return{formatName:e,formatOptions:r}}function Ks(t){var e={};return function(n,i,a){var o=i+JSON.stringify(a),s=e[o];return s||(s=t(i,a),e[o]=s),s(n)}}var uwe=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti(this,t),this.logger=Yi.create("formatter"),this.options=e,this.formats={number:Ks(function(r,n){var i=new Intl.NumberFormat(r,Sa({},n));return function(a){return i.format(a)}}),currency:Ks(function(r,n){var i=new Intl.NumberFormat(r,Sa(Sa({},n),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:Ks(function(r,n){var i=new Intl.DateTimeFormat(r,Sa({},n));return function(a){return i.format(a)}}),relativetime:Ks(function(r,n){var i=new Intl.RelativeTimeFormat(r,Sa({},n));return function(a){return i.format(a,n.range||"day")}}),list:Ks(function(r,n){var i=new Intl.ListFormat(r,Sa({},n));return function(a){return i.format(a)}})},this.init(e)}return Ai(t,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=n.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=Ks(n)}},{key:"format",value:function(r,n,i){var a=this,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=n.split(this.formatSeparator),u=s.reduce(function(l,c){var f=lwe(c),h=f.formatName,d=f.formatOptions;if(a.formats[h]){var p=l;try{var v=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},g=v.locale||v.lng||o.locale||o.lng||i;p=a.formats[h](l,g,Sa(Sa(Sa({},d),o),v))}catch(m){a.logger.warn(m)}return p}else a.logger.warn("there was no format function for ".concat(h));return l},r);return u}}]),t}();function WO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function YO(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hwe(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var dwe=function(t){bm(r,t);var e=cwe(r);function r(n,i,a){var o,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Ti(this,r),o=e.call(this),Sm&&Po.call(go(o)),o.backend=n,o.store=i,o.services=a,o.languageUtils=a.languageUtils,o.options=s,o.logger=Yi.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(a,s.backend,s),o}return Ai(r,[{key:"queueLoad",value:function(i,a,o,s){var u=this,l={},c={},f={},h={};return i.forEach(function(d){var p=!0;a.forEach(function(v){var g="".concat(d,"|").concat(v);!o.reload&&u.store.hasResourceBundle(d,v)?u.state[g]=2:u.state[g]<0||(u.state[g]===1?c[g]===void 0&&(c[g]=!0):(u.state[g]=1,p=!1,c[g]===void 0&&(c[g]=!0),l[g]===void 0&&(l[g]=!0),h[v]===void 0&&(h[v]=!0)))}),p||(f[d]=!0)}),(Object.keys(l).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(l),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(h)}}},{key:"loaded",value:function(i,a,o){var s=i.split("|"),u=s[0],l=s[1];a&&this.emit("failedLoading",u,l,a),o&&this.store.addResourceBundle(u,l,o),this.state[i]=a?-1:2;var c={};this.queue.forEach(function(f){zSe(f.loaded,[u],l),hwe(f,i),a&&f.errors.push(a),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(h){c[h]||(c[h]={});var d=f.loaded[h];d.length&&d.forEach(function(p){c[h][p]===void 0&&(c[h][p]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(i,a,o){var s=this,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!i.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:a,fcName:o,tried:u,wait:l,callback:c});return}this.readingCalls++;var f=function(v,g){if(s.readingCalls--,s.waitingReads.length>0){var m=s.waitingReads.shift();s.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(v&&g&&u2&&arguments[2]!==void 0?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),u&&u();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof a=="string"&&(a=[a]);var l=this.queueLoad(i,a,s,u);if(!l.toLoad.length)return l.pending.length||u(),null;l.toLoad.forEach(function(c){o.loadOne(c)})}},{key:"load",value:function(i,a,o){this.prepareLoading(i,a,{},o)}},{key:"reload",value:function(i,a,o){this.prepareLoading(i,a,{reload:!0},o)}},{key:"loadOne",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),u=s[0],l=s[1];this.read(u,l,"read",void 0,void 0,function(c,f){c&&a.logger.warn("".concat(o,"loading namespace ").concat(l," for language ").concat(u," failed"),c),!c&&f&&a.logger.log("".concat(o,"loaded namespace ").concat(l," for language ").concat(u),f),a.loaded(i,c,f)})}},{key:"saveMissing",value:function(i,a,o,s,u){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if(this.backend&&this.backend.create){var f=YO(YO({},l),{},{isUpdate:u}),h=this.backend.create.bind(this.backend);if(h.length<6)try{var d;h.length===5?d=h(i,a,o,s,f):d=h(i,a,o,s),d&&typeof d.then=="function"?d.then(function(p){return c(null,p)}).catch(c):c(null,d)}catch(p){c(p)}else h(i,a,o,s,c,f)}!i||!i[0]||this.store.addResource(i[0],a,o,s)}}}]),r}(Po);function HO(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var r={};if(Rr(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),Rr(e[2])==="object"||Rr(e[3])==="object"){var n=e[3]||e[2];Object.keys(n).forEach(function(i){r[i]=n[i]})}return r},interpolation:{escapeValue:!0,format:function(e,r,n,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function qO(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function KO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Di(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kh(){}function mwe(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(r){typeof t[r]=="function"&&(t[r]=t[r].bind(t))})}var Dp=function(t){bm(r,t);var e=pwe(r);function r(){var n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(Ti(this,r),n=e.call(this),Sm&&Po.call(go(n)),n.options=qO(i),n.services={},n.logger=Yi,n.modules={external:[]},mwe(go(n)),a&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,a),Qf(n,go(n));setTimeout(function(){n.init(i,a)},0)}return n}return Ai(r,[{key:"init",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(o=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var s=HO();this.options=Di(Di(Di({},s),this.options),qO(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Di(Di({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function u(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?Yi.init(u(this.modules.logger),this.options):Yi.init(null,this.options);var l;this.modules.formatter?l=this.modules.formatter:typeof Intl<"u"&&(l=uwe);var c=new $O(this.options);this.store=new JSe(this.options.resources,this.options);var f=this.services;f.logger=Yi,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new owe(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=u(l),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new swe(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new dwe(u(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var y=arguments.length,_=new Array(y>1?y-1:0),x=1;x1?y-1:0),x=1;x0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var d=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];d.forEach(function(m){i[m]=function(){var y;return(y=i.store)[m].apply(y,arguments)}});var p=["addResource","addResources","addResourceBundle","removeResourceBundle"];p.forEach(function(m){i[m]=function(){var y;return(y=i.store)[m].apply(y,arguments),i}});var v=Qu(),g=function(){var y=function(x,b){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),v.resolve(b),o(x,b)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return y(null,i.t.bind(i));i.changeLanguage(i.options.lng,y)};return this.options.resources||!this.options.initImmediate?g():setTimeout(g,0),v}},{key:"loadResources",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kh,s=o,u=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(u&&u.toLowerCase()==="cimode")return s();var l=[],c=function(d){if(d){var p=a.services.languageUtils.toResolveHierarchy(d);p.forEach(function(v){l.indexOf(v)<0&&l.push(v)})}};if(u)c(u);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(h){return c(h)})}this.options.preload&&this.options.preload.forEach(function(h){return c(h)}),this.services.backendConnector.load(l,this.options.ns,function(h){!h&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(h)})}else s(null)}},{key:"reloadResources",value:function(i,a,o){var s=Qu();return i||(i=this.languages),a||(a=this.options.ns),o||(o=Kh),this.services.backendConnector.reload(i,a,function(u){s.resolve(),o(u)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&uB.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var a=0;a-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}},{key:"changeLanguage",value:function(i,a){var o=this;this.isLanguageChangingTo=i;var s=Qu();this.emit("languageChanging",i);var u=function(h){o.language=h,o.languages=o.services.languageUtils.toResolveHierarchy(h),o.resolvedLanguage=void 0,o.setResolvedLanguage(h)},l=function(h,d){d?(u(d),o.translator.changeLanguage(d),o.isLanguageChangingTo=void 0,o.emit("languageChanged",d),o.logger.log("languageChanged",d)):o.isLanguageChangingTo=void 0,s.resolve(function(){return o.t.apply(o,arguments)}),a&&a(h,function(){return o.t.apply(o,arguments)})},c=function(h){!i&&!h&&o.services.languageDetector&&(h=[]);var d=typeof h=="string"?h:o.services.languageUtils.getBestMatchFromCodes(h);d&&(o.language||u(d),o.translator.language||o.translator.changeLanguage(d),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage&&o.services.languageDetector.cacheUserLanguage(d)),o.loadResources(d,function(p){l(p,d)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(i),s}},{key:"getFixedT",value:function(i,a,o){var s=this,u=function l(c,f){var h;if(Rr(f)!=="object"){for(var d=arguments.length,p=new Array(d>2?d-2:0),v=2;v1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=o.lng||this.resolvedLanguage||this.languages[0],u=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var c=function(d,p){var v=a.services.backendConnector.state["".concat(d,"|").concat(p)];return v===-1||v===2};if(o.precheck){var f=o.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(s,i)&&(!u||c(l,i)))}},{key:"loadNamespaces",value:function(i,a){var o=this,s=Qu();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(u){o.options.ns.indexOf(u)<0&&o.options.ns.push(u)}),this.loadResources(function(u){s.resolve(),a&&a(u)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(i,a){var o=Qu();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],u=i.filter(function(l){return s.indexOf(l)<0});return u.length?(this.options.preload=s.concat(u),this.loadResources(function(l){o.resolve(),a&&a(l)}),o):(a&&a(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=this.services&&this.services.languageUtils||new $O(HO());return a.indexOf(o.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kh,s=Di(Di(Di({},this.options),a),{isClone:!0}),u=new r(s);(a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a));var l=["store","services","language"];return l.forEach(function(c){u[c]=i[c]}),u.services=Di({},this.services),u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u.translator=new UO(u.services,u.options),u.translator.on("*",function(c){for(var f=arguments.length,h=new Array(f>1?f-1:0),d=1;d0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new Dp(t,e)});var rn=Dp.createInstance();rn.createInstance=Dp.createInstance;rn.createInstance;rn.dir;rn.init;rn.loadResources;rn.reloadResources;rn.use;rn.changeLanguage;rn.getFixedT;rn.t;rn.exists;rn.setDefaultNamespace;rn.hasLoadedNamespace;rn.loadNamespaces;rn.loadLanguages;rn.use(boe).init({resources:sW||{},lng:Is[lW]||"zhCn",fallbackLng:"zhCn",interpolation:{escapeValue:!1}}).then(()=>console.log("WebGAL i18n Ready!"));ea.render(C.jsx(fe.StrictMode,{children:C.jsx(Toe,{children:C.jsx(_F,{store:te,children:C.jsx(jSe,{})})})}),document.getElementById("root"));export{gr as C,_i as S,Me as T,L as W,cp as a,xwe as r}; diff --git a/packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-8a9071ee.js b/packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-c9e825dd.js similarity index 95% rename from packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-8a9071ee.js rename to packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-c9e825dd.js index 5a0333595..ba3ff1a94 100644 --- a/packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-8a9071ee.js +++ b/packages/terre2/assets/templates/WebGAL_Template/assets/initRegister-c9e825dd.js @@ -1 +1 @@ -import{r as w,W as p,C,T as k,S as M,a as y}from"./index-338efd63.js";const P=f=>{const S=p.gameplay.pixiStage.effectsContainer,g=p.gameplay.pixiStage.currentApp,e=new C;S.addChild(e);const n=k.from("./game/tex/cherryBlossoms.png");e.x=g.screen.width/2,e.y=g.screen.height/2,e.pivot.x=e.width/2,e.pivot.y=e.height/2,e.scale.x=1,e.scale.y=1;const i=[];function l(d){var o;const c=y.width,m=y.height,r=new M(n);let s=.25;r.scale.x=.15*s,r.scale.y=.15*s,r.anchor.set(.5),r.x=Math.random()*c-.5*c,r.y=0-.5*m,r.dropSpeed=Math.random()*5,r.acc=Math.random(),e.addChild(r),i.push(r);let h=0;for(const t of i){h++;const a=Math.random();t.dropSpeed=t.acc*.01+t.dropSpeed,t.y+=d*f*t.dropSpeed*.3+.7,h%2===0?(t.x+=d*a*.5,t.rotation+=d*a*.03):(t.x-=d*a*.5,t.rotation-=d*a*.03)}i.length>=200&&((o=i.shift())==null||o.destroy(),e.removeChild(e.children[0]))}return p.gameplay.pixiStage.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:l},"cherryBlossoms-Ticker"),{container:e,tickerKey:"cherryBlossoms-Ticker"}};w("cherryBlossoms",()=>P(3));const T=(f,u)=>{var c;const g=p.gameplay.pixiStage.effectsContainer,e=p.gameplay.pixiStage.currentApp,n=new C;g.addChild(n);const i=k.from("./game/tex/raindrop.png");n.x=e.screen.width/2,n.y=e.screen.height/2,n.pivot.x=n.width/2,n.pivot.y=n.height/2,n.scale.x=1,n.scale.y=1;const l=[];function d(m){var h;const r=y.width,s=y.height;for(let o=0;o=.5&&(t.alpha=.5),t.alpha<=.2&&(t.alpha=.2),n.addChild(t),l.push(t),l.length>=2500&&((h=l.shift())==null||h.destroy(),n.removeChild(n.children[0]))}for(const o of l)o.dropSpeed=o.acc*.01+o.dropSpeed,o.y+=m*f*o.dropSpeed*1.1+3}return(c=p.gameplay.pixiStage)==null||c.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:d},"rain-Ticker"),{container:n,tickerKey:"rain-Ticker"}};w("rain",()=>T(6,10));const b=f=>{var d;const S=p.gameplay.pixiStage.effectsContainer,g=p.gameplay.pixiStage.currentApp,e=new C;S.addChild(e);const n=k.from("./game/tex/snowFlake_min.png");e.x=g.screen.width/2,e.y=g.screen.height/2,e.pivot.x=e.width/2,e.pivot.y=e.height/2,e.scale.x=1,e.scale.y=1;const i=[];function l(c){var t;const m=y.width,r=y.height,s=new M(n);let h=Math.random();h<=.5&&(h=.5),s.scale.x=.144*h,s.scale.y=.144*h,s.anchor.set(.5),s.x=Math.random()*m-.5*m,s.y=0-.5*r,s.dropSpeed=Math.random()*2,s.acc=Math.random(),e.addChild(s),i.push(s);let o=0;for(const a of i){o++;const x=Math.random();a.dropSpeed=a.acc*.01+a.dropSpeed,a.y+=c*f*a.dropSpeed*.3+.7,o%2===0?(a.x+=c*x*.5,a.rotation+=c*x*.03):(a.x-=c*x*.5,a.rotation-=c*x*.03)}i.length>=500&&((t=i.shift())==null||t.destroy(),e.removeChild(e.children[0]))}return(d=p.gameplay.pixiStage)==null||d.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:l},"snow-Ticker"),{container:e,tickerKey:"snow-Ticker"}};w("snow",()=>b(3)); +import{r as w,W as p,C,T as k,S as M,a as y}from"./index-cbe8d2e0.js";const P=f=>{const S=p.gameplay.pixiStage.effectsContainer,g=p.gameplay.pixiStage.currentApp,e=new C;S.addChild(e);const n=k.from("./game/tex/cherryBlossoms.png");e.x=g.screen.width/2,e.y=g.screen.height/2,e.pivot.x=e.width/2,e.pivot.y=e.height/2,e.scale.x=1,e.scale.y=1;const i=[];function l(d){var o;const c=y.width,m=y.height,r=new M(n);let s=.25;r.scale.x=.15*s,r.scale.y=.15*s,r.anchor.set(.5),r.x=Math.random()*c-.5*c,r.y=0-.5*m,r.dropSpeed=Math.random()*5,r.acc=Math.random(),e.addChild(r),i.push(r);let h=0;for(const t of i){h++;const a=Math.random();t.dropSpeed=t.acc*.01+t.dropSpeed,t.y+=d*f*t.dropSpeed*.3+.7,h%2===0?(t.x+=d*a*.5,t.rotation+=d*a*.03):(t.x-=d*a*.5,t.rotation-=d*a*.03)}i.length>=200&&((o=i.shift())==null||o.destroy(),e.removeChild(e.children[0]))}return p.gameplay.pixiStage.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:l},"cherryBlossoms-Ticker"),{container:e,tickerKey:"cherryBlossoms-Ticker"}};w("cherryBlossoms",()=>P(3));const T=(f,u)=>{var c;const g=p.gameplay.pixiStage.effectsContainer,e=p.gameplay.pixiStage.currentApp,n=new C;g.addChild(n);const i=k.from("./game/tex/raindrop.png");n.x=e.screen.width/2,n.y=e.screen.height/2,n.pivot.x=n.width/2,n.pivot.y=n.height/2,n.scale.x=1,n.scale.y=1;const l=[];function d(m){var h;const r=y.width,s=y.height;for(let o=0;o=.5&&(t.alpha=.5),t.alpha<=.2&&(t.alpha=.2),n.addChild(t),l.push(t),l.length>=2500&&((h=l.shift())==null||h.destroy(),n.removeChild(n.children[0]))}for(const o of l)o.dropSpeed=o.acc*.01+o.dropSpeed,o.y+=m*f*o.dropSpeed*1.1+3}return(c=p.gameplay.pixiStage)==null||c.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:d},"rain-Ticker"),{container:n,tickerKey:"rain-Ticker"}};w("rain",()=>T(6,10));const b=f=>{var d;const S=p.gameplay.pixiStage.effectsContainer,g=p.gameplay.pixiStage.currentApp,e=new C;S.addChild(e);const n=k.from("./game/tex/snowFlake_min.png");e.x=g.screen.width/2,e.y=g.screen.height/2,e.pivot.x=e.width/2,e.pivot.y=e.height/2,e.scale.x=1,e.scale.y=1;const i=[];function l(c){var t;const m=y.width,r=y.height,s=new M(n);let h=Math.random();h<=.5&&(h=.5),s.scale.x=.144*h,s.scale.y=.144*h,s.anchor.set(.5),s.x=Math.random()*m-.5*m,s.y=0-.5*r,s.dropSpeed=Math.random()*2,s.acc=Math.random(),e.addChild(s),i.push(s);let o=0;for(const a of i){o++;const x=Math.random();a.dropSpeed=a.acc*.01+a.dropSpeed,a.y+=c*f*a.dropSpeed*.3+.7,o%2===0?(a.x+=c*x*.5,a.rotation+=c*x*.03):(a.x-=c*x*.5,a.rotation-=c*x*.03)}i.length>=500&&((t=i.shift())==null||t.destroy(),e.removeChild(e.children[0]))}return(d=p.gameplay.pixiStage)==null||d.registerAnimation({setStartState:()=>{},setEndState:()=>{},tickerFunc:l},"snow-Ticker"),{container:e,tickerKey:"snow-Ticker"}};w("snow",()=>b(3)); diff --git a/packages/terre2/assets/templates/WebGAL_Template/index.html b/packages/terre2/assets/templates/WebGAL_Template/index.html index 4c8941556..b48f09648 100644 --- a/packages/terre2/assets/templates/WebGAL_Template/index.html +++ b/packages/terre2/assets/templates/WebGAL_Template/index.html @@ -7,7 +7,7 @@ WebGAL - + From f1c87559b7958a4512887b5e75949a2baa8376da Mon Sep 17 00:00:00 2001 From: Mahiru Date: Mon, 4 Nov 2024 21:25:24 +0800 Subject: [PATCH 4/4] update version --- package.json | 2 +- packages/origine2/package.json | 2 +- packages/origine2/src/config/info.ts | 2 +- .../game/template/template.json | 2 +- packages/terre2/package.json | 2 +- packages/terre2/src/main.ts | 2 +- releasenote.md | 36 ++++--------------- 7 files changed, 12 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index 346d8d1d2..afd9df52a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webgal-terre", - "version": "4.5.8", + "version": "4.5.9", "private": true, "scripts": { "dev": "concurrently \"yarn dev:terre\" \"yarn dev:origine\" \"yarn dev:start-dev-server\"", diff --git a/packages/origine2/package.json b/packages/origine2/package.json index 9cfe2b1e9..58b3b195e 100644 --- a/packages/origine2/package.json +++ b/packages/origine2/package.json @@ -1,7 +1,7 @@ { "name": "webgal-origine-2", "private": true, - "version": "4.5.8", + "version": "4.5.9", "license": "MPL-2.0", "scripts": { "dev": "lingui extract && lingui compile --typescript && vite --host", diff --git a/packages/origine2/src/config/info.ts b/packages/origine2/src/config/info.ts index 885803fbf..1e5a7dfb9 100644 --- a/packages/origine2/src/config/info.ts +++ b/packages/origine2/src/config/info.ts @@ -4,6 +4,6 @@ export interface Info { } export const __INFO: Info = { - version: '4.5.8', + version: '4.5.9', buildTime: '2024-11-03T16:28:55.197Z', // 编译时会通过 version-sync.js 自动更新 }; diff --git a/packages/terre2/assets/templates/WebGAL_Template/game/template/template.json b/packages/terre2/assets/templates/WebGAL_Template/game/template/template.json index f0934b9a3..3194a3688 100644 --- a/packages/terre2/assets/templates/WebGAL_Template/game/template/template.json +++ b/packages/terre2/assets/templates/WebGAL_Template/game/template/template.json @@ -1,4 +1,4 @@ { "name":"Default Template", - "webgal-version":"4.5.8" + "webgal-version":"4.5.9" } diff --git a/packages/terre2/package.json b/packages/terre2/package.json index d27deec7b..261aaf6bc 100644 --- a/packages/terre2/package.json +++ b/packages/terre2/package.json @@ -1,6 +1,6 @@ { "name": "webgal-terre-2", - "version": "4.5.8", + "version": "4.5.9", "description": "", "author": "", "private": true, diff --git a/packages/terre2/src/main.ts b/packages/terre2/src/main.ts index c4c949f89..844f1ebcf 100644 --- a/packages/terre2/src/main.ts +++ b/packages/terre2/src/main.ts @@ -8,7 +8,7 @@ import { env } from 'process'; import { WsAdapter } from '@nestjs/platform-ws'; let WEBGAL_PORT = 3000; // default port -export const version_number = `4.5.8`; +export const version_number = `4.5.9`; if (env.WEBGAL_PORT) { WEBGAL_PORT = Number.parseInt(env.WEBGAL_PORT); } diff --git a/releasenote.md b/releasenote.md index b73c195f8..e87f58a85 100644 --- a/releasenote.md +++ b/releasenote.md @@ -4,19 +4,11 @@ #### 新功能 -允许修改 Live2D 绘制范围 - -允许设定立绘的 z-index - -模拟口型同步 - -优化版本升级提示 - -优化文件选择器,可以按文件名过滤 +对话内容支持不间断的连续空格 #### 修复 -优化场景文件保存的稳定性 +引擎修复:读取存档时意外在状态表中存储了多份演出记录的问题;带有 id 的效果音播放在停止后演出未完全清除的问题;对状态表和演出控制器中的演出列表在插入时去重 ## Release Notes @@ -25,19 +17,11 @@ #### New Features -Allow modifying Live2D drawing range - -Allow setting the z-index of the standing picture - -Simulate lip sync - -Optimized version upgrade prompt - -Optimized file picker to filter by file name +Dialogue content now supports continuous spaces. #### Fixes -Optimized the stability of scene file saving +Engine fixes: Fixed an issue where multiple performance records were unexpectedly stored in the state table when loading a save; fixed an issue where performances with IDs were not completely cleared after stopping sound effects playback; deduplicated performance lists in the state table and performance controller upon insertion. ## リリースノート @@ -46,19 +30,11 @@ Optimized the stability of scene file saving #### 新機能 -Live2D 描画範囲変更可能 - -立ち絵 z-index 設定可能 - -口パク同期シミュレーション - -バージョンアップメッセージ最適化 - -ファイルセレクター最適化、ファイル名フィルタリング可能 +会話内容で連続するスペースが正しく表示されるようになりました。 #### 修正 -シーンファイル保存安定性最適化 +エンジン修正:セーブデータ読み込み時にステータステーブルに複数の演出記録が重複して保存される問題、ID付きの効果音が停止した後も演出が完全にクリアされない問題、ステータステーブルと演出コントローラーの演出リストへの挿入時に重複を除去するように修正しました。 [//]: # ()